Tag: cpanel

Cloud Linux, Control Panel

Some useful commands for Account migrations in Cpanel server

Pre migration steps (DNS) rsync -avHl /var/named/ /home/named.backup/ sed -i -e “s/14400/600/” /var/named/*.db newserial=$(date +%Y%m%d%H) sed -i -e “s/[0-9]\{10\}/$newserial/” /var/named/*.db rndc reload For customers with a large number of domains you can use the find command. cd /var/named find . -name “*.db” -exec sed -i -e “s/TTL\ 14400/TTL\ 600/” {} \; newserial=$(date +%Y%m%d%H) find . …

Cloud Linux, Control Panel, CPanel / WHM

How to enable jailed shell/SSH access to CPanel user using command line.

To enable jailed shell or SSH access to CPanel user. You can run below command. chsh -s /usr/local/cpanel/bin/jailshell username Kindly replace username with CPanel username. It will show output like below [[email protected] ~]# chsh -s /usr/local/cpanel/bin/jailshell abcde23 Changing shell for abcde23. Shell changed. [[email protected] ~]#

Cloud Linux, CPanel / WHM

WHM API to change the main account domain name from the SSH

If you want to change the cpanel hosting account domain name using SSH or whmapi then you can run below command. whmapi1 modifyacct user=username domain=newdomain.com Replace username with actual username and domain name with the domain name which you want to change. It will show output like below [[email protected] ]# whmapi1 modifyacct user=username domain=younewdomain.com — …

Cloud Linux, CPanel / WHM

WHM API to suspend/unsuspend CPanel account

If you want to suspend the account using WHM API from SSH and mention the reason of suspension then use below command. whmapi1 suspendacct user=userame reason=”Billing or Abuse complaint” replace username with actual cpanel username. If you want to unsuspend the account using WHM API from SSH. whmapi1 unsuspendacct user=username replace username with actual cpanel …