How to change cPanel password from command line

Posted: 0p in cPanel

How to change cPanel password from command line

1. Login to your server as root via SSH.

2. Execute the following script from the command line.

Replace [username] with the cPanel user name of the domain & [password] with the new password.
=====
/scripts/chpass [username] [password]
=====

If you are facing this error, please use the following command and reset.

warn [realchpass] Insecure passing of password on ARGV.
ERROR: /usr/local/cpanel/scripts/realchpass
interface. You can force a password
change through this script by setting
the environment variable
‘ALLOW_PASSWORD_CHANGE=1’.

-=-=-=-
export ALLOW_PASSWORD_CHANGE=1
-=-=-=-

3. Synchronizing the new password with FTP password;

In cPanel/WHM servers, whenever a new account is created in WHM, by default a FTP account is created. The cPanel password and FTP password are synchronized. Use the following command to synchronize the new password with FTP password.

====
/scripts/ftpupdate
====

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s