SysAdmin

Error – Remote host said: 554 5.3.0 rewrite: map site3_u not found Giving up on …

1 March 2007

A client started receiving bounce messages to a single address on a domain. Hi. This is the qmail-send program at host.domain.com. I’m afraid I wasn’t able to deliver your message to the following addresses. This is a permanent error; I’ve given up. Sorry it didn’t work out. <user@domain.com>: x.x.x.x does not like recipient. Remote host [...]

Read the full article →

Find Number of Running HTTPD Processes

28 February 2007

All HTTPD processes: lsof -i :80 | wc -l Only HTTPD processes currently connected to a remote client: lsof -i :80 | grep ESTABLISHED | wc -l

Read the full article →

Versions.sh – Shell Script to Find Installed Versions of Major Server Daemons

26 February 2007

I look at a lot of servers throughout the day. When taking a first look at a server it’s always helpful to know what versions of Apache, PHP and MySQL installed. I use Versions.sh to get the low down on one screen. [root@servername root]# versions.sh Linux <em>servername</em> 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST [...]

Read the full article →

Qmhandle Short Display Option

12 February 2007

Qmhandle is a Perl tool to aid in the management of the Qmail mailer daemon and queue. I sometimes use it to flush the queue, restart Qmail (or Apache, MySQL and several other major server daemons) with my mobile phone and MidpSSH. When clearing the queue, Qmhandle lists information for each message as it processes [...]

Read the full article →

Terminal server has exceeded maximum number of allowed connection

31 January 2007

This error gets me all the time when using MS Remote Desktop to access remote Windows servers. List the active sessions for the server 1.2.3.4   SESSIONNAME USERNAME ID STATE TYPE console Administrator 0 Active wdcon rdp-tcp 65536 Listen rdpwd rdp-tcp#2 Administrator 1 Active rdpwd rdp-tcp#4 Administrator 2 Active rdpwd Kill session #2  

Read the full article →

Apache Error: Client denied by server configuration

6 January 2007

Apache 2.0 changed the default DocumentRoot permissions to be very restrictive. While I can’t argue this is a better security paradigm than less restrictive default permissions, in the real world upgrading a server with 300+ domains, it can be a pain to script permissions changes in all of the config files. <Directory />     [...]

Read the full article →

More Apache 2.2 Mod_Auth_MySQL Issues

28 December 2006

I have found some configurations of Apache 2.2 with Mod_auth_mysql producing other 500 errors. The error log shows: Internal error: pcfg_openfile() called with NULL filename In Apache 2.2, the mod_auth_basic module may be the authoritative access module by default. To use Mod_auth_mysql add the following line as shown below in your Mod_auth_mysql configurations in httpd.conf [...]

Read the full article →

Argument list too long – Workarounds

28 December 2006

Trying to clean out my SPAM folder: [root@atlas cur]# rm -f * -bash: /bin/rm: Argument list too long Try this: for x in *; do rm -f $x; done Or: find . -name ‘*’ -print0 | xargs -0 rm

Read the full article →

MySQL Slow Query Logging

5 December 2006

Add to /etc/my.cnf under [mysqld] stanza MySQL5 log_slow_queries  = /var/log/mysqld-slow.log long_query_time   = 1 MySQL3, MySQL4 log-slow-queries=/var/log/mysqld-slow.log set-variable    = long_query_time=1

Read the full article →

Virtual IPs Under OSX

14 November 2006

To add a virtual loopback address: sudo ifconfig lo0 alias 127.0.0.2 netmask 255.255.0.0

Read the full article →