How to change cpanel account password from command line

As a Linux admin you must have the knowledge to manage servers via command-line. In a cPanel server there are a lot of back-end scripts available for different operations via command line. In this post I am explaining the different methods to change the cPanel account password. If you have the root access, you can simply change the password of a particular user account from the command line or from the WHM panel without knowing the current password. If you have only the cPanl account credentials, you can change it from the cPanlel itself. In this particular case, only have the cPanel account and you forgot the account password, you can contact the server admin and ask them to change the account password.

You can change the cPanel account password via different method. If you have the WHM or root access to the main server, it can be done easily. All of the methods are discussed below:

Method 1: Command line option

1. Login to server via SSH as root user

ssh [email protected]

2. Run the following scripts for changing an accounts password.

/scripts/chpass username passwd

3. You should run this script too to sync the new password in ftp conf files.

/scripts/ftpupdate 

Method 2: Through WHM

1. Login to WHM.

URL : https://ipaddress:2087 
Username : root or username of the re-seller account. 
Password : root password or Password of the re-seller account.

2. From the ‘Account Functions’ menu, select ‘Password Modification’.
3. Type the desired password into the Password Entry field.
4. Select the desired account from the Account Selection field.
5. You may not select the Allow MySQL password change checkbox as you do not want to use the new password as your MySQL password.
6. Click Change password to save the new password.

Method 3: Through cPanel account itself.

1. Login to cPanel.

URL : https://ipaddress:2083
Username : username of the account
Password : Password of the account

2. From the ‘Preferences’ menu, select ‘Change Password’.
3. Type the original password under Old Password.
4. Type the desired password into the New Password field.
5. Confirm the new password by entering it into the New Password (again) field.
6. You may not select the Allow MySQL password change checkbox as you do not want to use the new password as your MySQL password.
7. Click Change your password now! to save the new password.

That’s it…

Arunlal Ashok

Linux Server Administrator. I'm dealing with Linux servers since 2012. I started this blog to share and discuss my ideas with the world. Check My Profile!! in uPwork (oDesk) and let me know if you need any assistance. Thanks!!

You may also like...

Leave a Reply

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