Accessing the terminal in WHM or cPanel

The terminal is one of my new favorite additions to Cpanel and WHM. The terminal is very cool but remember, it can also be an extremely dangerous tool if not used properly. Please take extra care and caution when running commands in the terminal if you do not know what they do. The terminal can assist you in a wide variety of tasks on the server. If there is something that can be done from the control panel, it can probably be done somehow in the terminal and a whole lot more. Things like installing specialized software to run on your server, checking specific server stats and information, become a… Read More

Continue Reading

How to setup cron jobs in cPanel

WARNING: You need to have a good knowledge of Linux commands before you can use cron jobs effectively. Check your script with your hosting administrator before adding a cron job. Click the Cron Jobs icon in the Advanced panel. Enter the email address where you want the cron job results sent after each time it runs. Define when and how often you want your cron job to run. You can choose the common settings from the dropdown menus or enter these manually. NOTE: When choosing a common setting, all fields are filled in automatically. This can help you understand what each field means. Next, enter the command of the script you want… Read More

Continue Reading

Check Disk Use for Each Email Box for All cPanel Accounts

Run the below script as root, and after waiting you will be presented with the disk usage for each email account CP_ACCOUNTS=`ls -1A /var/cpanel/users/` for user in `echo -n $CP_ACCOUNTS` do domain=`grep -i ^dns /var/cpanel/users/$user |cut -d= -f2` for dom in `echo -n “$domain”` do PASSWD_FILE=”/home/$user/etc/$dom/passwd” if [ -f $PASSWD_FILE ] && [ -s $PASSWD_FILE ] then for mail in `cat $PASSWD_FILE| cut -d”:” -f1` do du -h –max=0 /home/$user/mail/$dom/$mail done fi done done

Continue Reading