cPanel utility scripts for server administration commands

cPanel is best and No.1 web hosting control panel for Linux environment, which will help administrator to manage everything without headache. when you are hosting a domain name, it will automatically add all the entries such as Creating account on server, home directory, DNS zone, adding to exim, adding to database, ftp, etc.. and this can’t possible on normal server and we need to create everything manually, it’s too hard. Also we can’t manage bulk domains (1000+) in manual server. Also read about cPanel/WHM logs file location & cPanel/WHM Configuration files location. Even though we have future rich GUI and still want to perform few actions on command line, cPanel having 400+ utility scripts to manage cPanel activity on CLI. Here i’m listing important cPanel utility scripts. The scripts are located @ /usr/local/cpanel/scripts and we can use the scripts like /scripts/script_name.

/scripts/addnsadd a dns zone
/scripts/addpopadd a pop3 email account
/scripts/addservletsAdd JSP support to a domain (tomcat server required)
/scripts/adduserAdd a user to the system
/scripts/buildeximconfRebuilds exim.conf
/scripts/chpasschange cpanel passwords to particular account
/scripts/courierupused to update/reinstall courier
/scripts/cpbackup --forceto backup accounts (if backups enabled on WHM)
/scripts/easyapacherecompile apache
/scripts/editquotato manually set a users quota limit
/scripts/eximupto update exim to latest version - will overwrite any manual changes which was made on exim.conf file
/scripts/fixcommonproblemsfixes mailbox permissions, mailman, cgi scripts, ndc and quotas
/scripts/fixmailmanfixes common mailman issues
/scripts/fixndcfixes rndc errors with named
/scripts/fixquotasfixes quota problems
/scripts/fullhorderesetresets horde database to a fresh one - all previous user data are lost
/scripts/ftpupused to update/install FTP server (pureftpd or proftpd) to latest version
/scripts/generatemaildirsizegenerates new maildirsize for any or all users
/scripts/initquotasinitializes quotas
/scripts/installzendoptinstalls zend optimizer via phpextensionmgr
/scripts/killacctterminate an account - make sure you take a backup of the account first
/scripts/killdnsremoves a DNS Zone
/scripts/mailpermfixes permission problems with mail directories
/scripts/makecpphprebuilds internal PHP from /var/cpanel/easy/apache/profile/makecpphp.profile.yaml
/scripts/mysqlupused to update mysql to latest version specified in /var/cpanel/cpanel.config
/scripts/pkgacctto create an account backup
/scripts/phpupto update PHP only
/scripts/phpextensiomgrInstalls IonCube, Zend Optimizer, SuHosin & eAccelerator
/scripts/rebuildnamedconfrebuilds /etc/named.conf with zones from /var/named/*.db
/scripts/restartsrv_$servicenamerestart script for services
/scripts/restorepkgrestores an account from a backup file (pkgacct file)(must be in /home)
/scripts/runlogsnowupdate logs of all users
/scripts/runweblogsupdate stats for a particular user
/scripts/securetmpsecures /tmp partition with options nosuexec and nosuid
/scripts/suspendacctsuspends an account
/scripts/unsuspendacctunsuspends a suspended account
/scripts/upcp --forceupdates cpanel to the latest version
/scripts/updatenowupdates the cpanel scripts
/scripts/updateuserdomainsupdates /etc/userdomains entries from /var/cpanel/users
/scripts/wwwacctto create new accounts (wwwacct user password)

Hope this article was useful for you. Kindly provide your valuable feedback/comments in the commenting section.

Stay tuned with us !!

Magesh Maruthamuthu

Love to play with all Linux distribution

You may also like...