Updated WHM/cPanel Scripts and Commands for Server Management
Managing a cPanel/WHM server requires various scripts and commands. Below is an updated list of essential WHM/cPanel scripts, including legacy and modern commands, to help streamline administration tasks.
Essential WHM/cPanel Scripts and Commands
These scripts and commands assist in managing user accounts, DNS, quotas, mail services, security, and overall server maintenance.
/scripts/adddns - Add a DNS Entry
/scripts/addfpmail - Install Frontpage Mail Extensions
/scripts/addservlets - Add JavaServlets to an account (JSP plugin required)
/scripts/adduser - Add a User
/scripts/admin - Run WHM Lite
/scripts/apachelimits - Add Rlimits (CPU and memory limits) to Apache
/scripts/dnstransfer - Resync with a master DNS server
/scripts/editquota - Edit a User's Quota
/scripts/finddev - Search for Trojans in /dev
/scripts/findtrojans - Locate Trojan Horses
/scripts/fixtrojans - Remove Trojans found in logs
/scripts/fixcartwithsuexec - Make Interchange work with suexec
/scripts/fixinterchange - Fix most problems with Interchange
/scripts/fixwebalizer - Fix Webalizer stats issues
/scripts/fixvaliases - Repair broken valias files
/scripts/hdparamify - Enable DMA and 32-bit IDE hard drive access (once per boot)
/scripts/initquotas - Re-scan quotas and fix disk space display issues
/scripts/installzendopt - Install Zend Optimizer
/scripts/ipusage - Display IP usage report
/scripts/killacct - Terminate an account
/scripts/killbadrpms - Remove security-risk RPMs
/scripts/mailperm - Fix mail permission issues
/scripts/mysqlpasswd - Change a MySQL password
/scripts/quicksecure - Kill potential security problem services
/scripts/rebuildippool - Rebuild the IP address pool
/scripts/remdefssl - Remove problematic SSL entries from Apache
/scripts/restartsrv - Restart a service (e.g., Apache, Exim, MySQL, SSHD)
/scripts/rpmup - Sync security updates from RedHat/Mandrake
/scripts/runlogsnow - Force a Webalizer/Analog update
/scripts/secureit - Remove non-critical SUID binaries
/scripts/suspendacct - Suspend an account
/scripts/sysup - Sync cPanel RPM updates
/scripts/unblockip - Unblock an IP address
/scripts/unsuspendacct - Unsuspend an account
/scripts/upcp - Update cPanel
/scripts/updatenow - Update /scripts
/scripts/wwwacct - Create a new account
/scripts/rebuilddnsconfig - Rebuild the DNS configuration
/scripts/check_cpanel_rpms - Validate and repair cPanel-installed RPMs
/scripts/restartsrv_* - Restart any cPanel service (e.g., /scripts/restartsrv_httpd for Apache)
/scripts/cleansessions - Clear old cPanel & WHM sessions
/scripts/convert_mbox_to_maildir - Convert Mbox to Maildir format
/scripts/fixquotas - Reset quotas and ensure proper usage reporting
/scripts/pkgacct - Package an account for backup or transfer
/scripts/restorepkg - Restore an account from a backup package
/scripts/enable_spf_dkim - Enable SPF and DKIM for email authentication
/scripts/rebuild_phpconf - Rebuild PHP configuration with the preferred handler
/scripts/updateuserdomains - Refresh user domain mappings
/scripts/autorepair - Run automated repair scripts for cPanel issues
/scripts/setupmailserver - Install and configure the mail server (Exim, Dovecot, etc.)
/scripts/fixeverything - Run multiple cPanel repair scripts in one command
/scripts/whmapi1 - Use WHM API for advanced automation (e.g., whmapi1 listaccts)
Final Thoughts
These scripts and commands are essential for managing a WHM/cPanel server efficiently. Regular updates and maintenance using the right commands ensure better performance and security. Keep this list handy for quick reference.