Bu işlemi hazir scriptle yapabilmekteyiz. Bu script sadece aşagıdaki sürümlerde çalişmaktadir.
- Parallels Plesk Panel 9.x for Linux/Unix
- Parallels Plesk Panel 8.x for Linux/Unix
- Parallels Plesk Panel 10.x for Linux
- Parallels Plesk Panel 9.x for Windows
- Parallels Plesk Panel 8.x for Windows
- Parallels Plesk Panel 10.x for Windows
- Parallels Business Automation – Standard 4.2
- Parallels Business Automation – Standard 4.1
- Parallels Business Automation – Standard 4.0
- Parallels Business Automation – Standard 3.3
Öncelikle bu scripti download ediyoruz. Sunucu içerisinde zipten cıkartıp aşagıdaki adimlari izliyoruz;
Not: Php.ini dosyasındaki exec fonksiyonun enabled olmasi gerekmektedir scriptin çalişabilmesi için.
disable_functions = "apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd, eval, exec, ... , mysql_pconnect"
Linuxler için aşagıdaki komutu kullanıyoruz
# php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` ['new admin password'] [options]
Windowslar için aşagıdaki komutu kullanıyoruz
"%plesk_dir%\additional\PleskPHP5\php.exe" -d open_basedir= -d safe_mode=0 plesk_password_changer.php <old admin password> [new admin password] [options]
Hangi şifreleri degiştirebiliceginizi secebilirsiniz.
–all – [default] Tüm şifreleri yeniden olusturur
–admin – Sadece admin parolasini degiştirir
–resellers – Sadece bayi parolalarini degiştirir
–clients – Sadece müşteri parolalarını degiştirir
–domains – Domain ftp şifrelerini degiştirir
–domainadmins – Plesk panel giriş müşteri şifresini degiştirir
–users – Hosting panel kullanıcılarının şifresini degiştirir
–additionalftpaccounts – Ftp şifrelerini degiştirir.
–subdomains – Subdomain şifrelerini degiştirir
–webusers – İnternet kullanıcılarının şifresini degiştirir
–mailaccounts -Mail kullanıcılarının şifrelerini degiştirir.
Örnek
php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` | # means that passwords for all PP entities will be reset, password for admin will be generated automatically |
php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` –domains | # means that passwords for main FTP account of domains only |
php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` ‘s3$ret!’ –admin –clients | # means that passwords for admin and clients will be reset, password for admin will be “s3$ret!” (without quotes) |
php -d open_basedir= -d safe_mode=0 plesk_password_changer.php `cat /etc/psa/.psa.shadow` ‘s3$ret!’ | # means that passwords for all PP entities will be reset, password for admin will be “s3$ret!” (without quotes) |
Not:
Admin şifresi yeniden olusturulacaktir eğer <new admin password> belirlenmemişse.
Script güncelledigi tüm yenilikleri ve şifreleri new_plesk_passwords.csv dosyasına kaydeder.
Çıktı örnekleri
[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