How to retrieve user passwords

I found these in a forum and use them quite often when someone forgets their password.

First log in to the MySQL server with the following shell command (or use your favorite GUI):

$mysql -u admin -p`cat /etc/psa/.psa.shadow`;
use psa;

Once you're logged in you could do any of the following:

1) List ALL mail names and passwords:
select CONCAT(mail_name,"@",name) as email_address,accounts.password from mail left join domains on domains.id=mail.dom_id left join accounts on accounts.id=mail.account_id;

2) List ALL mail names and passwords for a specific domain:
(replace domain.com with your domain)

select CONCAT(mail_name,"@",name) as email_address,accounts.password from mail left join domains on domains.id=mail.dom_id left join accounts on accounts.id=mail.account_id where name like '%domain.com%';

3) And finally, this is how you list all domain users. Note that these are not mail names. These are the ones users use to log in to Plesk:

select REPLACE(sys_users.home,'/home/httpd/vhosts/','') AS domain,sys_users.login,accounts.password from sys_users LEFT JOIN accounts on sys_users.account_id=accounts.id;
Leave a comment
Name
Email (optional)
Your email will only be used to show your Gravatar and to send you replies to this article (if you opt to receive them). You won't get ANY other messages at all!
Comment
No HTML allowed
Notify me via email
 
 
Share

Valid HTML 4.01 Strict