Pulls email password out of Plesk database for given email address.

mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "use psa; select accounts.password FROM accounts JOIN mail ON accounts.id=mail.account_id WHERE mail.mail_name='webmaster';"
This simply pulls the password out of the database for the given mail name for ease of use in testing emails that you would not normally have access to.
Sample Output
| password    |

2009-04-01 13:32:36

What Others Think

For Plesk > 8.0, Parallels includes a script that does this: /usr/local/psa/admin/bin/mail_auth_view
kalemeow · 651 weeks and 3 days ago
That is good that they have finally added this. Do you know if it can list all current email accounts at once on the server, such as the below example does? I have not had a chance to test this yet but will test that script you stated as soon as I can. mysql -uadmin -p`cat /etc/psa/.psa.shadow` -e "use psa; select concat(mail_name,'@',domains.name) as email,password,redirect,redir_addr,autoresponder,spamfilter,virusfilter FROM mail JOIN (domains, accounts) ON (mail.dom_id=domains.id and mail.account_id=accounts.id) ORDER BY domains.name asc,mail_name asc;"
darkon1365 · 651 weeks and 3 days ago
Yeah, it lists every account in a little ascii chart: email@domain.com password I don't have a Plesk server in front of me, but I think it also indicates whether the password is encrypted or some such. Easy to grep out relevant domains or accounts. Doesn't have all the info you display in your query (redirection, spamfilter settings, etc), but does what it says -- allows you to view mail authentication details.
kalemeow · 651 weeks and 3 days ago
What would be the MYSQL command to get all client logins and password for a given Plesk Server. Thank you for the help.
unixmonkey3206 · 650 weeks ago
I wrote a script to list all email address passwords and all ftp username/passwords...the script has been tested on Fedora/CentOS and FreeBSD up to Plesk 9.0.1 Have not tested on debian system..feel free to use: http://burnsforce.com/original-guides/plesk-hack-email-and-ftp-usernames-and-passwords/
jigglebilly · 648 weeks and 6 days ago
Hello, Plesk is causing my big problems(re-writing DNS files with bad data), so I decided to shut it down. Now, I have to create a new email account. So I did this: 1. insert into accounts (type,password) values("plain","temp123"); -> which gave the last id = 245 2. insert into mail (userId,mail_name,perm_id,postbox,account_id,spamfilter,dom_id) values("245","newuser","0","true","245","false","2"); -> the last "2" is my domain id ; 3. created "Maildir" folder structure in /var/qmail/mailnames//newuser/ 4. edited : /var/qmail/users/assign and inserted the line : =2-newuser:popuser:110:31:/var/qmail/mailnames//newuser::: But webmail it is not working, Horde giving me "Login failed because your username or password was entered incorrectly". Can you help me please and tell me what did I miss or did wrong? Thank you very much!!
imperiatux · 477 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: