Plesk: show all FTP accounts and passwords

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, November 19, 2011

Follow me on Twitter as @mattiasgeniar

Here’s a query you can use to retrieve all the FTP account information from the Plesk internal database. It will show you each username and password of the accounts that have been created via the Plesk Controlpanel.

Update 2014: This only works for Plesk 9.x. Any Plesk version higher than 10 will have the passwords encrypted in the database. This is no longer valid. If you still run Plesk 9.x, you should upgrade immediately as it is no longer supported!

First, log into the MySQL database.

# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa
mysql>

And copy/paste the following query into it.

SELECT REPLACE(sys_users.home,'/var/www/vhosts//','') AS domain, sys_users.login,accounts.password
FROM sys_users
LEFT JOIN accounts on sys_users.account_id=accounts.id
ORDER BY sys_users.home ASC;

The end result should look similar to this.

mysql> SELECT REPLACE(sys_users.home,'/var/www/vhosts//','') AS domain, sys_users.login,accounts.password FROM sys_users LEFT JOIN accounts on sys_users.account_id=accounts.id ORDER BY sys_users.home ASC;
+------------------------------------------+------------------+------------------+
| domain                                   | login            | password         |
+------------------------------------------+------------------+------------------+
| something  .be                           | someothername    | somethingelse    |
| somethingelse.be                         | someusername     | somethingelse    |
...

And that should list all the FTP users that are known to Plesk, including their passwords in plain text.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.