• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

retrieve passwords in plain text from psa DB

S

sys_user

Guest
Hello,

Passwords are encrypted and I cannot retreive them with:
use psa;
select * from sys_users,accounts where accounts.id=sys_users.id and sys_users.login='username';
+-----+-------------+------------+--------------------------------+-----------+-------+-----+-------+------------+
| id | login | account_id | home | shell | quota | id | type | password |
+-----+-------------+------------+--------------------------------+-----------+-------+-----+-------+------------+
| 104 | username | 391 | /var/www/vhosts/username.coml | /bin/bash | 0 | 104 | plain | 3WcHfBOlmA |
+-----+-------------+------------+--------------------------------+-----------+-------+-----+-------+------------+


this password don't match FTP/SSH login that I have provided during creation of domain.

Please note that accounts table show me that passwords are stored in plain text.

mysql> select * from accounts where id='104';
+-----+-------+------------+
| id | type | password |
+-----+-------+------------+
| 104 | plain | 3WcHfBOlmA |
+-----+-------+------------+
 
Hello,

From the sql query you posted, it seems the id you need to select in table accounts is 391, and not 104.

The field 'account_id' in the table 'sys_users' correspond to the field 'id' in the table 'accounts'. So try

mysql> select * from accounts where id='391';

Cheers
 
Either way, the aren't. They are plain text, thats for sure.
 
Some handy queries

Here are some handy queries for getting usernames and passwords for different things in the PSA database. Hope this helps some people (replace yourdomain.com with the domain you are looking up info for):

Client Info (Plesk and SSH Login)
SELECT clients.login, clients.cname, clients.email, accounts.password FROM domains LEFT JOIN clients ON domains.cl_id = clients.id LEFT JOIN accounts ON clients.account_id = accounts.id WHERE domains.name = 'yourdomain.com';

System Info (FTP Login)
SELECT sys_users.login, accounts.password, sys_users.home, sys_users.shell FROM domains RIGHT JOIN hosting ON domains.id = hosting.dom_id LEFT JOIN sys_users ON hosting.sys_user_id = sys_users.id LEFT JOIN accounts ON sys_users.account_id = accounts.id WHERE domains.name = 'yourdomain.com';

Database Info
SELECT data_bases.name, db_users.login, accounts.password FROM domains RIGHT JOIN data_bases ON domains.id = data_bases.dom_id RIGHT JOIN db_users ON data_bases.id = db_users.db_id LEFT JOIN accounts ON db_users.account_id = accounts.id WHERE domains.name = 'yourdomain.com';

Email Info
SELECT mail.mail_name, accounts.password FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id WHERE domains.name = 'yourdomain.com';
 
Email Info
SELECT mail.mail_name, accounts.password FROM domains LEFT JOIN mail ON domains.id = mail.dom_id LEFT JOIN accounts ON mail.account_id = accounts.id WHERE domains.name = 'yourdomain.com';

Hi mediashaker,

Using this query I keep getting "[BLOB - 12 Bytes]" in my password row.
Anything I'm doing wrong?
 
Back
Top