How To Reset The Plesk Admin Password Through Shell?

May 22, 2013 / Control Panels

Passwords are usually case-sensitive. If a user doesn’t remember a password, he might face a really bad situation

Follow the process mentioned below in order to reset the Plesk root password using Shell and Command Prompt

The procedure of resetting the Plesk (Linux Server) root password through Shell:

[root@plesklinux root]# cd /usr/local/psa/admin/bin

[root@plesklinux bin]# ./ch_admin_passwd —help

./ch_admin_passwd: Utility for setting the Plesk administrator’s password

This fetches password from the environment variable PSA_PASSWORD

The password must consist of symbols ranging from 5-16 and it is important to avoid using the login name, quotes, national characters or whitespace.

[root@plesklinux bin]# export PSA_PASSWORD=’newpass’

[root@plesklinux bin]# echo $PSA_PASSWORD
newpass

[root@plesklinux bin]# ./ch_admin_passwd

[root@plesklinux bin]# export PSA_PASSWORD=

[root@plesklinux bin]# cat /etc/psa/.psa.shadow
newpass

[root@plesklinux bin]#

The procedure of resetting the Plesk (Windows Server) root password through Shell:

The Plesk Windows Root Password can also be reset through the plesksrvclient binary that is located in the %plesk_bin% directory.

For this, go to the Windows command prompt, enter the following command, and hit enter:

cd %plesk_bin%

This command will take you to the directory where the Plesk Bin Folder is situated.

In order to get the existing root password, enter the command mentioned below:

plesksrvclient.exe –get

The existing password will be displayed in a pop up window. In order to copy it on the clipboard, click on the ‘OK’ button
In order to create a new password, enter the command given above without ‘-get’

plesksrvclient.exe <NEWPASS>

This command will enable you to add a new desired password for the Plesk Admin account. You can learn How to Configure Password Strength for Users in WHM, ensuring robust protection against unauthorized access.