Plesk password recovery

If you forgot your admin password in Plesk, you’ll need to connect to your server with ssh and you can find the password in the file /etc/psa/.psa.shadow .

[root@apollo ~]# cat /etc/psa/.psa.shadow
<admin_pass>

To find mailbox’s password in Plesk, connect to your server with ssh, then use the following SQL query to reveal mailbox password (replace MAILBOX_NAME with your mailbox name):

[root@apollo ~]# mysql -u admin -p`cat /etc/psa/.psa.shadow` psa
[...]
mysql> SELECT m.mail_name, d.name, a.password FROM mail AS m LEFT JOIN (domains AS d, accounts AS a) \
ON (m.dom_id = d.id AND m.account_id = a.id) WHERE m.mail_name='MAILBOX_NAME'

5 comments ↓

#1 henk on 12.18.08 at 11:29 am

Thanks for the great tips. i used them allready. But only the query to find a mailbox password in plesk doesn’t work. it returns an empty set. I did use my own email account, but no return value

#2 Vitalie Cherpec on 12.18.08 at 12:19 pm

If your email is john@example.com replace ‘MAILBOX_NAME’ in sql query with ‘john’ (without domain).

#3 Henk on 01.09.09 at 10:36 pm

Hi, it worked. Wasn’t able to test it because i accidently installed plesk 9. Hope you didn’t. All I got was sh*t. But in the end I fixed almost all. so i’m back in testing stuff.

regards,

Henk

#4 Eduard Haritonov on 03.25.10 at 11:43 pm

This is an add-on for Plesk to view passwords in control panel:

http://forum.parallels.com/showthread.php?t=100225

Cost: $5

#5 Peter Huizenga on 09.01.10 at 10:55 am

Found this one better than running some sql queries:
/usr/local/psa/admin/sbin/mail_auth_view | grep “Domainname”

Leave a Comment