Search

Language:  
Search for:

Available article translations:

Plesk Mass Password Reset Script

Article ID: 113391, created on Feb 29, 2012, last review on Aug 17, 2015

APPLIES TO:
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 10.1 for Linux/Unix
  • Plesk 9.0 for Linux/Unix
  • Plesk 11.0 for Windows
  • Plesk 11.5 for Windows
  • Plesk 10.1 for Windows
  • Plesk 9.0 for Windows
  • Odin Business Automation Standard 4.5
  • Odin Business Automation Standard 4.1

Release Notes

The Mass Password Reset Script is designed to allow Parallels Plesk owners to reset the passwords of all Plesk accounts automatically.

Please feel free to provide your feedback about the script on the Plesk Forum.

Note: Users that have Plesk nodes registered in Customer & Business Manager must perform the actions described in the Customer & Business Manager Specific section.

Usage:

  1. Download the script

    Download the script (for Plesk 12)

to your Plesk server.

2. Unzip it.

3.  Run it as described below.

**Note**: The `exec` function of PHP has to be enabled, so during `plesk_password_changer.php` execution, comment the following line in `php.ini`:

    disable_functions = 'apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, ... , mysql_pconnect'

Linux:

    # /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer.php `cat /etc/psa/.psa.shadow` ['new admin password'] [options]

Windows:

    "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file= plesk_password_changer.php <old admin password> [new admin password] [options]

Where [options] can be:

    --all - [default] reset passwords for all supported entities

    --admin - reset the password for admin

    --additionaladmins - reset passwords for additional administrator accounts

    --clean-up-sessions - clean up the sessions table in the Plesk database

    --resellers - reset passwords for resellers

    --clients - reset passwords for clients

    --domains - reset passwords for the main FTP account of domains

    --domainadmins - reset passwords for Domain Administrators

    --users - change passwords for hosting panel users

    --additionalftpaccounts - reset passwords for additional FTP accounts for domains

    --subdomains - reset passwords for subdomains. NOTE: For Plesk 10.x, subdomains are treated as domains.

    --dbusers - change passwords for database users

    --webusers - reset passwords for Web Users

    --mailaccounts - reset passwords for mail accounts

    --pdusers - change passwords for protected directories users

    --apsc - change the password for the apsc database

    --mailaccounts - reset passwords for mail accounts (note that in Plesk 10.x and higher, passwords will be NOT changed for mail accounts which are created during user creation (and linked with this user). Passwords for these mail accounts should be reset using the option --users)

Examples:

  • Reset all passwords for all Plesk entities and generate a password for admin automatically:

    php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow`
    
  • Reset passwords for the main FTP account of a domain only:

    php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` --domains
    
  • Reset passwords for admin and client accounts and set the admin password to s3$ret!:

    php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` 's3$ret!' --admin --clients
    
  • Reset all passwords for all Plesk entities and set the admin password to s3$ret!:

    php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` 's3$ret!'
    

Important information:

The Plesk admin password will be generated if <new admin password> is not specified.

The script writes new passwords and information about updated accounts into the _new_plesk_passwords.csv_ file.

Output example:

[2011-10-11 11:30:55][INFO] ==> Installed Plesk version/build: 10.4.4 Debian 5.0 1013111102.18

[2011-10-11 11:30:55][INFO] ==> Detect system configuration
[2011-10-11 11:30:55][INFO] OS: Debian GNU/Linux 5.0 \n \l
[2011-10-11 11:30:55][INFO] Arch: i386

[2011-10-11 11:30:55][INFO] ==> Validate given db password
[2011-10-11 11:30:55][INFO] Result: OK

[2011-10-11 11:30:55][INFO] ==> Plesk Password Changer version: 10.4.0.23

[2011-10-11 11:30:55][INFO] ==> STEP 1: Change password for resellers...
[2011-10-11 11:30:56][INFO] Reseller login: res1 Email: reseller1@mail.com New password: Ajx3J4cHDjaG
[2011-10-11 11:30:57][INFO] Reseller login: res2 Email: reseller2@mail.com New password: Ua7TPxc6lsk9

[2011-10-11 11:30:57][INFO] ==> STEP 2: Change password for clients...
[2011-10-11 11:30:58][INFO] Client login: cl1 Email: client1@mail.com New password: qiCJJd1525Im
[2011-10-11 11:30:59][INFO] Client login: cl2 Email: client2@mail.com New password: LwrWpt4ybPxb

[2011-10-11 11:30:59][INFO] ==> STEP 3: Change password for users...
[2011-10-11 11:31:09][INFO] Hosting Panel User: mail1@domain.com New password: xtV2hsPy1Drj
[2011-10-11 11:31:15][INFO] Hosting Panel User: user1@domain2.com New password: NZGheFAsHTFn
[2011-10-11 11:31:17][INFO] Hosting Panel User: user1@domain3.tld New password: Pg7bgQ3hTrCx
[2011-10-11 11:31:18][INFO] Hosting Panel User: admin@gmail.com New password: nCkE17PhvG8h

[2011-10-11 11:31:18][INFO] ==> STEP 4: Change password for FTP users of domains...
[2011-10-11 11:31:20][INFO] FTP user ftp1 for domain domain.com New password: 9cmlKwXKjfv7
[2011-10-11 11:31:22][INFO] FTP user ftp2 for domain domain2.com New password: RZG9G7ZxbOVS
[2011-10-11 11:31:24][INFO] FTP user ftp3 for domain domain3.com New password: 5VKX83JwAb47
[2011-10-11 11:31:26][INFO] FTP user ftp4 for domain domain4.com New password: md3XuAfxgLAa

[2011-10-11 11:31:26][INFO] ==> STEP 5: Change password for additional FTP accounts...
[2011-10-11 11:31:28][INFO] Domain: domain4.com Additional FTP account: addftp1 New password: 5gsVrBlW8jjs

[2011-10-11 11:31:28][INFO] ==> STEP 6: Change password for mail accounts...
[2011-10-11 11:31:29][INFO] Mail account: justemail@domain.com New password: Rgfi3SJTTkps
[2011-10-11 11:31:30][INFO] Mail account: justEmail@domain2.com New password: OQcr9VtxOyGc

[2011-10-11 11:31:30][INFO] ==> STEP 7: Change password for web users of domains...
[2011-10-11 11:31:31][INFO] Web user wu1 for domain domain2.com New password: wrBX6dChkUXG
[2011-10-11 11:31:33][INFO] Web user wu2 for domain domain2.com New password: 870jUPoN06qc

[2011-10-11 11:31:33][INFO] ==> STEP 8: Change password for admin...
nohup: redirecting stderr to stdout
mysqld_safe[4677]: started
mysqld_safe[4696]: ended
[2011-10-11 11:31:55][INFO] Admin new password: ngtt5PmQfcgW

Found errors: 0; Found Warnings: 0

Customer & Business Manager

Note: Only Plesk 10.4.4 and Plesk 11.0 are supported

  1. If Plesk is installed and integrated with Customer & Business Manager, use the following command:

    Linux:

    # /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer.php `cat /etc/psa/.psa.shadow` --all --cbm --exclude-clients --exclude-resellers
    

    Windows:

    "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file="" plesk_password_changer.php <old admin password> --all --cbm --exclude-clients --exclude-resellers
    

    It is necessary to exclude "clients" and "resellers" because passwords for them will be changed as for Customer & Business Manager users.

    The --cbm option also changes the passwords for all Customer & Business Manager users that have been provisioned to all attached hosting panels.

  2. (Optional) If you also have Plesk instances that are remotely integrated with Customer & Business Manager, you need to reset the passwords on these servers with this command:

    Linux:

    # /usr/local/psa/bin/sw-engine-pleskrun plesk_password_changer.php `cat /etc/psa/.psa.shadow` --all --exclude-clients --exclude-resellers>
    

    Windows:

    "%plesk_dir%\admin\bin\php.exe" -dauto_prepend_file="" plesk_password_changer.php <old admin password> --all --exclude-clients --exclude-resellers
    

    This changes the passwords for all other Plesk entities, but preserves the passwords of clients and resellers which were already changed through Customer & Business Manager on Step 1.

  3. After completing Step 2, change the Customer & Business Manager admin password and update the admin passwords of all Hosting Panels attached to Customer & Business Manager.

Search words:

same account

plesk 12 upgrade problem

webmail user login account namen werde nicht aus confixx migriert

Warning: For Plesk to work, you need to select the default components from the list below. Make sure that the components you select are properly installed and configured. It is possible to change your selection afterwards.

asd

Your password is not complex enough

email password check

Unable to manage the subscriptions from PBAS CCP

ftppp

same mail account

mailbox password policy check

error

mail acount and password same

BCryptDecrypt

Business manager and hosting not syning

update empty passwords

reset passwords

database password update

forcing encryption

Mass Password Reset



Attachments:


a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 85a92ca67f2200d36506862eaa6ed6b8 aac4a8fcd879de03758354e15495d69a c796c01d6951fa24ed54c7f1111667c6 400e18f6ede9f8be5575a475d2d6b0a6 70a5401e8b9354cd1d64d0346f2c4a3e caea8340e2d186a540518d08602aa065 56797cefb1efc9130f7c48a7d1db0f0c bd7fc88cf1b01f097749ae6f87272128 0a53c5a9ca65a74d37ef5c5eaeb55d7f 6ef0db7f1685482449634a455d77d3f4 dd0611b6086474193d9bf78e2b293040 93123df14254afe4bfd02eb6096092cd df2db7f3302fe384002b885ca84f1a2f 31fd77b463b82e861f4fa3ac14168e1e aea4cd7bfd353ad7a1341a257ad4724a 46a8e394d6fa13134808921036a34da8 01bc4c8cf5b7f01f815a7ada004154a2 4f57df935e9acf8d18830757d2346419 514af229ae32522202a910a2649c80fb def31538ba607bde27398f48ab5956be 624ca542e40215e6f1d39170d8e7ec75

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Server Virtualization
- Odin Cloud Server
- Odin Containers for Windows 6.0
- Odin Virtuozzo Containers
Automation
- Odin Automation
- Odin Automation for Cloud Infrastructure
- Odin Business Automation Standard
- Odin Virtual Automation
- Odin Plesk Panel Suite
- Web Presence Builder
- Odin Plesk Automation
- Odin Small Business Panel
- Value-added Services for Hosters
- Odin Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification