Applicable to:
- Plesk for Linux
- Plesk for Windows
Question
How to bulk reset passwords in Plesk?
Answer
Use the Mass Password Reset script, which is designed to allow Plesk administrators to reset passwords for all accounts in one click.
Once executed, the script prints account names and their new passwords in the command output and to the new_plesk_passwords.csv file. The new_plesk_passwords.csv file will be created in the same directory where the script is located.
-
Download and unzip the script:
# wget https://support.plesk.com/hc/en-us/article_attachments/360009603299/plesk_password_changer_onyx.zip
# unzip plesk_password_changer_onyx.zip -
Run the script using one of the following ways:
-
Reset passwords for all Plesk accounts:
# /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer.php `cat /etc/psa/.psa.shadow`
-
Reset passwords for individual account groups:
# /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer.php `cat /etc/psa/.psa.shadow` [option]
where [option] is one of the following parameters:
-
--all - [default] reset passwords for all Plesk accounts
-
--admin - reset the password for the admin user
-
--additionaladmins - reset passwords for additional administrator accounts
-
--clean-up-sessions - close all active Plesk sessions
-
--resellers - reset passwords for all Plesk resellers
-
--clients - reset passwords for all Plesk customers
-
--domains - reset passwords for main FTP accounts of all subscriptions
-
--additionalftpaccounts - reset passwords for all additional FTP accounts of subscriptions
-
--users - reset passwords for all additional Plesk users and email accounts, if an email account is also a Plesk user
-
--mailaccounts - reset passwords for email accounts, if an email account does not have an access to Plesk.
-
--dbusers - reset passwords for all database users
-
--apsc - reset the password for the apsc database
Examples
-
-
Set a specific password for the admin user and reset passwords for all other Plesk accounts:
# /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer_onyx `cat /etc/psa/.psa.shadow` '*****'
-
Reset passwords for Plesk users and email accounts:
# /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer_onyx `cat /etc/psa/.psa.shadow` --users --mailaccounts
-
-
Download the script.
-
Extract the downloaded script.
-
Start a command prompt as an administrator and go to the directory where the extracted script is located:
C:\> cd /path/to/script/folder
-
Run the script using one of the following ways. In the commands below, replace ***** with an actual Plesk admin account password:
Note: To get a Plesk admin account password, use the 'plesk sbin psadb --get-admin-password' command.
-
Reset passwords for all Plesk accounts:
C:\> "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file= plesk_password_changer.php *****
-
Reset passwords for individual account groups:
C:\> "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file= plesk_password_changer.php ***** [option]
where [option] is one of the following parameters:
-
--admin - reset the password for the admin user
-
--additionaladmins - reset passwords for additional administrator accounts
-
--clean-up-sessions - close all active Plesk sessions
-
--resellers - reset passwords for all Plesk resellers
-
--clients - reset passwords for all Plesk customers
-
--domains - reset passwords for main FTP accounts of all subscriptions
-
--additionalftpaccounts - reset passwords for all additional FTP accounts of subscriptions
-
--users - reset passwords for all additional Plesk users and email accounts, if an email account is also a Plesk user.
-
--mailaccounts - reset passwords for email accounts, if an email account does not have an access to Plesk.
-
--dbusers - reset passwords for all database users
-
--apsc - reset the password for the apsc database
Examples
-
-
Set a specific password for the admin user (the password for Plesk SQL admin database user will be also changed) and reset passwords for all other Plesk accounts:
C:\> "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file= plesk_password_changer.php ***** new_password --admin
-
Reset passwords for Plesk users and email accounts:
C:\> "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file= plesk_password_changer.php ***** --users --mailaccounts
-
Comments
8 comments
How to Reset a specific domain users mail account passwords
Example :
is the above cmd Correct? any help
Thank you
Ramki
@Ramakrishnan R
This script does not support domain selection and only intended to reset passwords globally.
Instead, you may use the following command to list all mail accounts which belong to the domain example.com on Windows:
On Linux:
And update passwords one by one using:
Where 'mypass' is a new password.
Hi,
how could we run and FTP password reset for specific domains?
Hello @Pdiotis,
Thank you for your question.
This script does not support domain selection and only intended to reset passwords globally.
To change the password for FTP user, please check the following article: How to change FTP user password in Plesk?
Hola:
Necesito un script que resetee las contraseñas de un dominio en concreto y me genere un csv?
Podeis ayudarme?
Saludos
Hola xrofran,
Puedes preguntar por dicha funcionalidad a nuestro equipo de Professional Services aquí, que te lo harán bajo un coste ya que es una tarea administrativa.
Alternativamente, puedes crearte tu propio script en base a nuestra documentación de linea de comandos:
Un saludo
Hello, this script is not working for Plesk Obsidian. Any help?
I got below error.
[INFO] ==> Installed Plesk version/build: 18.0.25 CentOS 7 1800200325.19
[2020-04-01 02:09:01][FATAL_ERROR] Unable to find Plesk 8.x, Plesk 9.x, Plesk 10.x or Plesk 12.x. Tool must be launched prior to upgrade to Parallels Panel 12.0.18 for the purpose of getting a report on potential problems with the upgrade.
Hi Prodesignerch,
Then you used the wrong script. Please try with the Onyx one as stated in the article.
Please sign in to leave a comment.