You can reset an “admin”-account password in Plesk, but only if you have root-access to the specific server. Once you do, you can easily change the admin password to anything you desire – all though the password should be 5 to 16 characters long, and may not exceed that length.
If the reason of the reset is because you’ve lost your password, there’s an easier trick too – the admin-account password is stored in plain text on the server (don’t ask why …), and can easily be retrieved.
To find out the current password, look at the contents in /etc/psa/.psa.shadow as a root account.
$ cat /etc/psa/.psa.shadow</strong> my-pass
This can be enough to regain access to your Plesk account. If you must perform a reset, you can go about it as follows. Go to /usr/local/psa/admin/bin/
.
$ cd /usr/local/psa/admin/bin/
You’ll find a script there, titled ch_admin_passwd
. Run it with the –help parameter to find out what it does.
$ ./ch_admin_passwd --help ./ch_admin_passwd: Utility to set Plesk adminstrator's password Gets password from the environment variable PSA_PASSWORD Password should be from 5 to 14 symbols and should not contain login name, whitespace, quotes or national characters Usage: ./ch_admin_passwd -h, --help display this help and exit
So we need to define an environment variable called “PSA_PASSWORD
”, which will be used by the script to reset the password.
$ set PSA_PASSWORD='my-pass'
There can be no spaces between “PSA_PASSWORD”, and the equal-sign (=). This will become your new pasword of the admin account in Plesk.
Now run the script, to do the actual reset.
$ ./ch_admin_passwd
This can take a couple of seconds, depending on your server load. Afterwards, you can log in using your newly defined password. And to clean things up, it’s wise to remove the environment variable after the reset.
$ set PSA_PASSWORD=
You can see if the reset went ok, by looking at the value in /etc/psa/.psa.shadow
$ cat /etc/psa/.psa.shadow my-pass
And it’s as simple as that.