HoganHost blog

[email protected]

How to terminate cPanel account thorugh SSH

How to terminate, remove, or delete an account from your server.

In any situation, we indeed to terminate cPanel account due to many unexpected or expected reason. In such a case, we can terminate cPanel account by two ways. They are,

  1. Terminate an account through Ssh command
  2. Terminate an account through WHM XML – API
  3.  Terminate an account through Whm
Note
Before terminating the account from the server generate and download the account full backup. Once you delete the account you can’t retrieve that until or otherwise, you restore the same user account’s full backup.

 

Terminate an account through Ssh Command:

1. Login to the server via SSH as ‘root’

2.Run the following command, replacing Username with the Account name.Command:

scripts/removeacct username 
         or 
scripts/killacct username

3. Read the output line, and if you agree, type ‘y’.

# /scripts/removeacct cptest3
Are you sure you want to remove the account "cptest3", and DNS zone files for the user? [y/N]? y
...
cptest3 account removed

 

4. Read the output line, and if you don’t want to remove it, type ‘N’.

# /scripts/removeacct cptest4
Are you sure you want to remove the account "cptest4", and DNS zone files for the user? [y/N]? N
#

 

Once you terminate or deleted your account all the particular account owned properties like Email accounts, Databases, FTP accounts, DNS records, etc.. will be deleted permanently.
This terminate operation is irreversible i.e Once you delete the account you can’t retrieve that until or otherwise, you restore the same user account.

Terminate an account through WHM XML – API:

Run the below URL on your favourite browser, replace the cPanel session key and username with appropriate details.

https://hostname.example.com:2087/cpsess##########/xml-api/removeacct?user=yourdomainusername

Terminate an account through Whm

1. Log into WHM as ‘root’.

2. Navigate to the following location: WHM: Home -> Account Functions -> Terminate Accounts

 

3. Select the account you wish to remove.

 

4. Click ‘Remove’ button.

 

5. Verify this is the account to remove and click ‘Yes, remove this account’ button

6. The account is now removed.

 

Leave a Comment

Your email address will not be published. Required fields are marked *