Here's a scenario: you're locked out of plesk admin, you forgot the password and can't recover cause your email address is not set in the contact details.
Still have ssh access as root (ssh keys or can still remember password for root ) ? Most of the time I use dsa keys for ssh authentication.
If you do then you can change the password for admin.
Plesk keeps it's password in the psa mysql database so you just have to change it in the psa.accounts table . But to have access to it you need access as root in mysql.
If you don't have the password for root ( most likely on plesk servers ) you'll have to stop mysql and start it without privilege verification.
- /etc/init.d/mysql stop # stop mysql
- /usr/sbin/mysqld --skip-grant-tables & # start without privilege verification
- mysql -u root # log into mysql using the mysql client
That would work on most linux distros , on some the stop script would be /etc/init.d/mysqld and on others the path to the mysql server might be /usr/libexec/mysqld .
Once you're logged in run this sql to change the password:
- USE psa;
- UPDATE accounts SET password=md5('newpasswordhere') WHERE id=1 ;
Now get out of the mysql client ( CTRL+C) and restart mysql to have privilege verification back or else everyone would be able to do what you just did:
- killall -9 mysqld
- /etc/init.d/mysql start
Now you can login to plesk with the new password.