Feb 18, 2013
tom

hostnames: meaningful vs meaningless

Assume puppet-managed cluster of different servers – hardware, software, operating systems, virtual/dedicated etc. Would you go for meaningful hostnames (mysqlmaster01..99, mysqlslave001..999, vpnprimary, vpnbackup, etc). Or would you prefer meaningless names like characters from some book or movie w/e? My problem with meaningfull servers is that names usually represent a single service and if server has more than 1 purpose – it gets really messy(especially when server roles change often). Isn’t mapping service name <-> ip [...]

Continue Reading »
Feb 17, 2013
tom

can I delete the files in the proc folder without consequence?

I see my proc folder getting bigger and bigger and I have limitation in terms of number of files. Can I delete those files or will it have consequences? thanks Asked by Johan You can not delete them since they are not files. /proc is mounted using the procFS, which is not a real filesystem. Instead the contents are generated the moment you try to read from them. This also means it is not using [...]

Continue Reading »
Feb 16, 2013
tom

find command from PID

Is it possible to find the command line of a running process with its pid? the output of /proc/pid/cmdline seems that it removes the space character to it is hard to read the output. Asked by mahmood From: http://stackoverflow.com/questions/993452/splitting-proc-cmdline-arguments-with-spaces cat /proc/PID/cmdline | tr ’00′ ‘ ‘ cat /proc/PID/cmdline | xargs -0 echo Answered by Jay Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with [...]

Continue Reading »
Feb 15, 2013
tom

Allow complex sudo command on Debian Linux

I need to allow a specific command on a Debian Linux box for a single user. I’ve tried this in the /etc/sudoers file: # User privilege specification zabbix ALL=NOPASSWD: /usr/bin/apt-get –print-uris -qq -y upgrade 2>/dev/null |awk ‘{print $2}’ | wc | awk ‘{print $1}’ This does not work as expected. If I run the command as user zabbix with sudo, it asks for the password (although I have specified the NOPASSWD option). However, this works: [...]

Continue Reading »
Feb 14, 2013
tom

Linux: Allow complex sudo command

I need to allow a specific command on a Debian Linux box for a single user. I’ve tried this in the /etc/sudoers file: # User privilege specification zabbix ALL=NOPASSWD: /usr/bin/apt-get –print-uris -qq -y upgrade 2>/dev/null |awk ‘{print $2}’ | wc | awk ‘{print $1}’ This does not work as expected. If I run the command as user zabbix with sudo, it asks for the password (although I have specified the NOPASSWD option. However, this works: [...]

Continue Reading »
Feb 14, 2013
tom

What does a standard tech audit include and what is a reasonable price for it?

I am a programmer, but the company I am working for has been growing and has outgrown the 2 man IT contractor team that has been servicing us. We are looking into several different solutions for our IT needs now (smallish company 30 computers, 3 servers). I have been presented with a proposal from an IT company for a Tech Audit. The problem is I don’t know if they are covering all of the bases [...]

Continue Reading »
Feb 14, 2013
tom

Limit Apache log on Mac OS X 10.6

Yesterday I found that my Apache log file in my development machine was almost 50 GB in size. Is there a way to limit the site of the Apache log file? Asked by Onema This is typically done using logrotate. Example logrotate configuration for Apache: /var/log/httpd/*log { daily rotate 30 compress missingok notifempty sharedscripts postrotate /bin/kill -HUP `cat /var/run/httpd.pid 2>/dev/null` 2> /dev/null || true endscript } Answered by Warner Check more discussion of this question. [...]

Continue Reading »
Feb 12, 2013
tom

Running 32 bit printer drivers on a 64 bit Windows 7 Pro

I just purchased a new workstation for a company network which is Windows 7 Pro 64bit. Unfortunately they have an Imagistics im2520f Copier/Printer that only has 32bit drivers available. Windows 7 had no problem installing all the 32bit software, but is there a way to make this 32bit print-driver work on a 64bit system (with a wrapper software or something)? I tried just adding this device to the 2003 server as a shared printer, but [...]

Continue Reading »
Feb 11, 2013
tom

How do I check that a user password is locked?

I used: usermod -L myUser to disable the password for this account. Assuming that I don’t know the password how do I check that it has been disabled. According to the man page it places ! in the front of the encrypted password, but I don’t know how to check that either. Asked by DarkSheep You can use the passwd utility to look at the status of the user’s password entry passwd -S user user [...]

Continue Reading »
Feb 10, 2013
tom

Redirecting SSH through a machine

I’m looking for the simplest way to SSH from my local machine to a remote server through a server in the middle. If there’s a permanent way to do this even better. Asked by Benjamin K. In your ~/.ssh/config file: Host remote.example.com ProxyCommand ssh middle.example.com nc %h %p Answered by ceejayoz Check more discussion of this question. Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet about it [...]

Continue Reading »