GNU/LINUX System Administration notes

26May Seven golden sysadmin rules

1. Document everything you do ; You or someone else would come accross the same issue sometime else and from my long experiance; if you dont document you probably would have to start over again!
2. Face the issue from the head and tackle it from the tail! . The best sysadmin practice would be [...]

25May cpanel script to extract reseller users and domain names

This bash script is very useful if you are planning to do cpanel account migrations purely from the commandline and automate the process of the migration . This scripts extracts the names of all reseller users in the server to the file
/opt/reseller_list
and correspondingly for all users in this list extract the cpanel usernames to the [...]

22May apache2 mod_suphp php-cgi

A slight change in the setup and now i can see the user who is executing the scripts in my website
Before when apache intrepets a php script it calls fastcgi which inturn calls the php cgi binary.But still the php binary is executed as the calling user which in our case is the user [...]

22May apache mod_fcgid internal server error

Today gnusys.net had a little downtime as i was trying to change my apache-php interface into FastCGI.
The installation of php-cgi and mod_fcgid went pretty simple in my Debian Etch;so was the configuration
The tricky part was that the wordpress blog was giving Internal Server Error in the index page.
====
[Thu May 22 04:15:41 2008] [notice] mod_fcgid: call [...]

16May Apache Security

As everyone knows Apache is the most widely used web server and it has got a 75-25 usage rate when compared to Microsoft IIS. IIS was widely used before Apache and some of the major security flaws made people to rely on Apache which is upfront in terms of Security , flexibility and Reliability. I [...]

15May plesk increase php memory_limit for a vhost

You can change the php memory_limit value for a particular domain or on a per virtual host basis by the following way
Add the following line to the file
/home/httpd/vhosts/gnusys.net/conf/vhost.conf
php_admin_value memory_limit “128M”
Reconfigure the vhost by running the following command
/usr/local/psa/admin/sbin/websrvmng –reconfigure-vhost –vhost-name=gnusys.net
and restart the webserver using the command
/usr/local/psa/admin/sbin/websrvmng –restart
Check if the setting is correct using phpinfo(); function

15May plesk script to extract mailname password

The following script retrieves the password of a mailname given the mail account name as input
This is version.2.0 of the same .The previous one i had written was very complex and created many files in /tmp which was useless.Version 2.0 is an elegant approach and will not create any stale files!
wget http://gnusys.net/downloads/psamailpass.bash
bash psamailpass.bash