Search

Language:  
Search for:

Available article translations:

Plesk Mass Password Reset Script

APPLIES TO:
  • Parallels Plesk Panel 11.0 for Linux
  • Parallels Plesk Panel 11.5 for Linux
  • Parallels Plesk Panel 10.1 for Linux/Unix
  • Parallels Plesk Panel 9.0 for Linux/Unix
  • Parallels Plesk Panel 8.x for Linux/Unix
  • Parallels Plesk Panel 11.0 for Windows
  • Parallels Plesk Panel 11.5 for Windows
  • Parallels Plesk Panel 10.1 for Windows
  • Parallels Plesk Panel 9.0 for Windows
  • Parallels Plesk Panel 8.x for Windows
  • Parallels Business Automation - Standard 4.0
  • Parallels Business Automation - Standard 3.3

Release Notes

The Mass Password Reset Script is designed to allow Parallels Plesk Panel (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 Parallels Business Automation - Standard (PBA-S) must perform the actions described in the PBA-S Specific section.

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 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 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 creating (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</td>
    
  • 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` &#39;s3$ret!&#39; --admin --clients</td>
    
  • 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

PBA-S Specific

Use the following instructions if you use PBA-S 4.1.x or a previous version with Parallels Plesk Panel 10.x or a previous version. Also, if you use PBA-S 4.2, note that these instructions only need to be applied for Parallels Plesk Panel versions prior to 11.x.

If Plesk Panel is registered as a Plesk node in PBA-S, after resetting passwords with the plesk_password_changer script (see above), integration between Plesk and PBA-S will be affected.

In order to recover integration with Plesk, you need to run reset_plesk_passwords.pl on the PBA-S management node. This script will change the passwords for Plesk instances that are stored in the PBA-S database, as well as the admin password that is used to connect to the Plesk node.

The script reset_plesk_passwords has two execution modes:

  • without the --process parameter, the script will check the data consistency inside the CSV file and show the queries that will be executed in the aspc database (without actual execution)

  • with the --process parameter, the script will execute the necessary queries for password changes for Plesk instances

Usage:

# perl reset_plesk_passwords.pl --hw_ip=<plesk node IP address> --file=<output CSV file generated by plesk_password_changer.php>

The output of this script will be as follows:

Input parameters: hw_ip=>10.52.53.101, hw_id=>, file=>new.csv, process=>
Running in debug mode, use --process parameter to alter DB
Processing client(s)...
No entities of type client found in CSV file!
Processing customer(s)...
No entities of type customer found in CSV file!
Processing reseller(s)...
Following statements will be executed:
UPDATE `plesk_client_cache` SET `plesk_password` = 'sHMHLrDJA9KlQWE' WHERE `hw_id` = '10' AND `plesk_login` = 'pbas_client1' AND `type` = '1';
UPDATE `plesk_client_cache` SET `plesk_password` = 'aHkgsUyETsDKQWE' WHERE `hw_id` = '10' AND `plesk_login` = 'pbasclien2_gma_5com_1034' AND `type` = '1';
Processing domain(s)...
Following statements will be executed:
UPDATE `plesk_domain_cache` SET `plesk_password` = 'OMu8tNVUcSOF' WHERE `hw_id` = '10' AND `plesk_name` = 'pbasSub1.a10-52-53-101.qa.plesk.ru';
Processing admin...
Following statements will be executed:
UPDATE `hw` SET `root_password` = 'something' WHERE `hw_id` = '10';
Finished successfully

# perl reset_plesk_passwords.pl --hw_ip=<plesk node IP address> --file=<output CSV file generated by plesk_password_changer.php> --process

The output of this script will be as follows:

Input parameters: hw_ip=>10.52.53.101, hw_id=>, file=&gt;new.csv, process=>1
Processing client(s)...
No entities of type client found in CSV file!
Processing customer(s)...
No entities of type customer found in CSV file!
Processing reseller(s)...
Processing domain(s)...
Processing admin...
Finished successfully

Instead of the IP address of a Plesk node, you can supply the script with the ID of this Plesk node from the PBA-S database.

# perl reset_plesk_passwords.pl  --hw_id=<id> --file=<output CSV file generated by plesk_password_changer.php> --process

Customer & Business Manager Specific

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 Panels that are remotely integrated with Customer & Business Manager, then you need to reset 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:

Business manager and hosting not syning

webmail user login account namen werde nicht aus confixx migriert

webmail user login account namen werde nicht aus confixx migriert



Attachments:


49af2da0f2dd4c81e962790bbbd0c2b4 5d735c0e028ee5b991e4fb80d34fb87f c9a51db9739ff1afe0e40fbfb2f7491d 5fc602d72ea565f353b9320e2ef62a1b 1aa1c890c6389095129322a3a7c695a6 04f1b0f9f311a40f2f06e7821a7faf9a 4f06e569887915c59ae1fa4680142e7f 5bd3f4f2334d8bf7c60583795fa0e860 9dfd4bb3665bd4c452b32ae3b8f7d9f1 caea8340e2d186a540518d08602aa065 56797cefb1efc9130f7c48a7d1db0f0c 5226779925a794968a8db8478c393d31 625de95d329ad29e411ba38fcc0ad3cb bbe0373935bc886984e30ddeb0b46919 c7658ac2f68d6572a213687c1077afff ec6d78150f157dcf9ef9cca1654d860c 903d2077868a54d07bbef2dd3613eb17 4cf552a419b63c46a83e80b4d83ff93f 06e81f1ab4b5cad9d3f946deecd91752 e31a9debb6ab77383997c35d0dcf4649 6d7d554563b7b77c7f8e8a903a4c0630 75b59b1c6cdbaf382ebb2e4d11777032 970a12d7813e6f20383aaae2db2a50d6 6eab23e8dac1eb5df9820a41f94cf4b4 9bdfc6d5b1cfb9e0945a156597f8e6d3 0324051e74e0392d1551a3b559b09eaa

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Desktop Virtualization
- Parallels Desktop 8 for Mac
- Parallels Transporter
- Parallels Desktop Switch to Mac Edition
- Parallels Desktop for Mac Enterprise Edition
- Parallels Management-Mac for Microsoft SCCM
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0 Beta
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification