{"id":41,"date":"2015-04-27T09:39:02","date_gmt":"2015-04-27T09:39:02","guid":{"rendered":"http:\/\/betakb.veeble.org\/?p=41"},"modified":"2025-04-29T12:10:34","modified_gmt":"2025-04-29T06:40:34","slug":"cpanel-cli-power-must-know-scripts","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/cpanel-cli-power-must-know-scripts\/","title":{"rendered":"cPanel CLI Power: Must-Know \/scripts"},"content":{"rendered":"<p>When cPanel &amp; WHM is installed, a number of predefined scripts become available in your server\u2019s \/scripts directory. One can use any of the scripts simply by typing its location in a terminal session. For example, if we wanted to run the update script, we would type:<\/p>\n<pre>\/scripts\/upcp \n<\/pre>\n<p><b>The available scripts are:-<\/b><\/p>\n<pre>build_maxemails_config \u2014 Sets limits on the amount of email that users can send from domains on your server. \neasyapache \u2014 Upgrades and reinstalls Apache. \nphpextensionmgr \u2014 Manages PHP extensions. \n<\/pre>\n<pre><b>*up<\/b> \u2014 Updates a service. The following update scripts are available for the services noted: \n  courierup \u2014 Courier mail server. \n  cpaddonsup \u2014 cPanel\u2019s addon scripts. \n  dovecotup \u2014 Dovecot mail server. \n  eximup \u2014 Exim mail exchanger. \n  ftpup \u2014 FTP servers (ProFTP and Pure-FTP). \n  imapup \u2014 IMAP mail server. \n  mysqlup \u2014MySQL service. \n  nsdup \u2014 BIND nameserver. \n  phpup \u2014 Current version of PHP. \n  suphpup \u2014 SuPHP tool for handling PHP requests. \n<\/pre>\n<pre><b>restartsrv_*<\/b> \u2014 Restarts a service. simply replace the asterisk (*) in restartsrv_* with the term: \n  apache \u2014 Apache web server. \n  bind \u2014 BIND nameserver software. \n  chkservd \u2014 cPanel\u2019s TailWatch log processing service. \n  clamd \u2014 ClamAV anti-virus software. \n  courier \u2014 Courier mail server. \n  cpdavd \u2014 cPanel\u2019s WebDAV server. \n  cppop \u2014 cPanel\u2019s POP server. \n  dovecot \u2014 Dovecot mail server. \n  entropychat \u2014 Entropy chat client. \n  exim \u2014 Exim mail exchanger. \n  eximstats \u2014 Exim mail statistics tracker. \n  ftpserver \u2014 FTP server. \n  httpd \u2014 Apache web server. \n  imap \u2014 IMAP server. \n  inetd \u2014 Super-server daemon for managing Internet services. \n  interchange \u2014 Interchange e-commerce software. \n  ipaliases \u2014 IP aliasing software. \n  melange \u2014 Melange chat client. \n  mysql \u2014 MySQL database server. \n  named \u2014 BIND nameserver software. \n  nsd \u2014 Open-source NSD nameserver daemon. \n  postgres \u2014 PostgresSQL database service. \n  postgresql \u2014 PostgreSQL database service. \n  proftpd \u2014 ProFTP server daemon. \n  pureftpd \u2014 Pure-FTP server daemon. \n  rsyslogd \u2014 Open-source log forwarder daemon. \n  spamd \u2014 Spam-deferral daemon. \n  sshd \u2014 Secure shell daemon. \n  syslogd \u2014 Log forwarder daemon. \n  tailwatchd \u2014 cPanel\u2019s TailWatch log processing service. \n  tomcat \u2014 Apache Tomcat service. \n  xinetd \u2014 Open-source super-server daemon. \n<\/pre>\n<pre>addpop \u2014 Adds a POP account. \ndelpop \u2014 Removes a POP account. \nwwwacct \u2014 Adds a cPanel account. \nkillacct - Removes a cPanel account.\nkilldns - Removes a DNS zone.\n<\/pre>\n<pre>restorepkg \u2014 Restores a package. \ncpbackup \u2014 Runs backups as configured in WHM &gt;&gt; Main &gt;&gt; Backup &gt;&gt; Configure Backup. \npkgacct \u2014 Creates a cPanel backup of an account. \nupcp \u2014 Updates cPanel and WHM. \nupcp-running \u2014 Specifies whether a upcp command is running.\nsetupmailserver \u2014 Allows you to switch between mailservers. \nsetupftpserver \u2014 Allows you to switch between FTP servers. \nsetupnameserver \u2014 Allows switching between DNS servers. \n<\/pre>\n<pre>checkperlmodules \u2014 Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction\nfixperlscript - Allows to specify a Perl script that needs to be scanned and repaired.\nrealperlinstaller, below. This script can be used with the following arguments: \n --force will reinstall every module, regardless of whether or not it is working. \n --full will ensure that all modules are present as opposed to only checking for essential modules. \n<\/pre>\n<pre>realperlinstaller \u2014 A wrapper script that automates the installation of Perl CPAN modules. \nsuspendacct \u2014 Suspends an account. \nunsuspendacct \u2014 Unsuspends an account. \nrunweblogs \u2014 Updates statistics for a user. \nrunstatsonce \u2014 Updates statistics for all users. \nmakecpphp \u2014 Re-installs cPanel\u2019s internal PHP. \nportsup \u2014 Updates ports (FreeBSD\u00ae systems only). \ncheck_users_my_cnf \u2014 Check user accounts for ~\/.my.cnf files that do not work and disable them. This script only returns output when it detects a bad .my.cnf. \ncomparegdbm \u2014 Compare the contents of 2 GDBM files. It is required to specify the 2 GDBM files if one wishes to compare after the script. \nFor example: \/scripts\/comparegdbm $file1 $file2 where the $file1 and $file2 represent the 2 files you wish to compare.\n<\/pre>\n<pre>autorepair - For repairing spam database, horde patch etc.\nbuilddovecotconf - Builds Dovecot conf file.\nbuildeximconf - Builds Exim conf file.\nbuildhttpdconf - Builds http conf file.\n<\/pre>\n<pre>chcpass - command line password changing script for cPanel servers. eg:- \/scripts\/chcpass user2 newpassword\nchkmydns - Performs a simple configuration check of MyDNS.\ncleanphpsessions - Clear PHP sessions.\ncphulkdblacklist - To manage blacklists in the command line. eg:- \/scripts\/cphulkdblacklist 1.1.1.1\ncphulkdwhitelist - To manage whitelists in the command line. eg:- \/scripts\/cphulkdwhitelist 1.1.1.1\n<\/pre>\n<pre>installzendopt - Installs Zend Optimizer\ninstallgd - Installs GD\ninstallsqlite3 - Installs Sqlite3\ninstallpostgres - Installs PostgreSQL\ninstallruby - Installs Ruby in the server\ninstallimagemagick - Installs ImageMagik on the server.\n<\/pre>\n<pre>reinstallmailman \u2014 Reinstall MailMan\nfixmailinglistperms \u2014 Repairs permissions for all mailing list files and directories.\ngenerate_maildirsize\u2013 Fix mailbox size\nmailperm - Corrects the permissions of the user mail directories.\nmakecpphp - Compile cpanel php\nphpini - Rebuilds php.ini\n<\/pre>\n<pre>rebuildippool - Rebuild Ip Address Pool.\nrebuildhttpdconf - Rebuilds the HTTP conf.\nupdate_db_cache- This script updates the mysql database usage.\nipusage - Display IP usage Report.\nwhoowns - Display which user owns a particular domain.\nupdatenameserverips - Updates the nameserver IP addresses in the server.\nupdateuserdomains \u2014 Update \/etc\/userdomains file \nsysup \u2014 Syncup Cpanel RPM Updates \nquicksecure \u2014 Kill Potential Security Problem Services\n<\/pre>\n<pre>fixwebalizer \u2014 Run this if a user\u2019s stats stop working\nfixquotas \u2014 Fix account\u2019s quota\nfixhome \u2014 Fix Permissions on accounts\nfixndc \u2014 To try and fix domain controller\nfindtrojans \u2014 Locate Trojan Horses<\/pre>\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-0ec124df wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">WordPress: Performance, Security, Peace.<\/h3><p class=\"uagb-cta__desc\">Stop website worries. Fast speeds, security, 24\/7 support. Auto-updates, backups, staging. Focus on your business.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-wordpress\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore Plans.<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>When cPanel &amp; WHM is installed, a number of predefined scripts become available in your server\u2019s \/scripts directory. One can use any of the [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":8787,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[4],"tags":[],"class_list":["post-41","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts.jpg",1366,768,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts-150x150.jpg",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts-300x169.jpg",300,169,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts-768x432.jpg",768,432,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts-1024x576.jpg",1024,576,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts.jpg",1366,768,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2015\/04\/cPanel-CLI-Power-Must-Know-scripts.jpg",1366,768,false]},"uagb_author_info":{"display_name":"Digin Dominic","author_link":"https:\/\/www.veeble.com\/kb\/author\/digin-dominic\/"},"uagb_comment_info":1,"uagb_excerpt":"When cPanel &amp; WHM is installed, a number of predefined scripts become available in your server\u2019s \/scripts directory. One can use any of the [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=41"}],"version-history":[{"count":3,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":8788,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/41\/revisions\/8788"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/8787"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}