What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again.

Delete that bloated snippets file you've been using and share your personal repository with the world. 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.

Get involved!

You can sign-in using OpenID credentials, or register a traditional username and password.

First-time OpenID users will be automatically assigned a username which can be changed after signing in.

Universal configuration monitoring and system of record for IT.

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:



May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!

Top Tags



Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

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

Terminal - 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';"
2009-04-01 13:32:36
User: darkon1365
Pulls email password out of Plesk database for given email address.

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.


There are 3 alternatives - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

For Plesk > 8.0, Parallels includes a script that does this:


Comment by kalemeow 394 weeks and 6 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;"

Comment by darkon1365 394 weeks and 6 days ago

Yeah, it lists every account in a little ascii chart:

[email protected] 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.

Comment by kalemeow 394 weeks and 6 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.

Comment by unixmonkey3206 393 weeks and 3 days 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:


Comment by jigglebilly 392 weeks and 1 day ago


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!!

Comment by imperiatux 220 weeks and 5 days ago

Your point of view

You must be signed in to comment.