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 the script:
# curl -LO https://raw.githubusercontent.com/plesk/kb-scripts/master/plesk-password-changer/plesk-password-changer.php
-
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.php `cat /etc/psa/.psa.shadow` '*****'
-
Reset passwords for Plesk users and email accounts:
# /usr/local/psa/bin/sw-engine-pleskrun plesk-password-changer.php `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
0 comments
Please sign in to leave a comment.