Use md5 to generate a pretty hard to crack password

echo "A great password" | md5sum
You can also use sha1sum and variants for longer passwords
Sample Output

2009-04-24 14:32:56

What Others Think

1. 32 character length is too long for a password. If you ask md5sum to give you the password every time you need it, the security risk is too high. 2. It only has [0-9a-f], how can you think it is hard to crack?
jxy · 585 weeks ago
jxy: While your first point is valid, your second one is not. A 32-character password using base-16 has: 16^32 password possibilities, which comes out to about 3.4 x 10^38. Let's say you use lower & uppercase letters, numbers, and a reasonable amount (20) different special characters. A password would have to be length 20 to match that order of magnitude. And 20 characters is also rather long.
dfego · 585 weeks ago
jxy: I won't tell you're wrong about asking md5sum every time for a password, but at least is more secure than using "love". Also, since most cracking apps first try using a dictionary attack, this can improve just a little bit your security. I know there are many ways of getting a more secured password, but hey, this is just another way.
ubersoldat · 585 weeks ago
Well, you could pipe the output of your command to base64 to get numbers and upper and lower letters. You could also pipe to cut to make it shorter (or just use the first n chars if you're just going to select it with your mouse). You'll also possibly get hyphen and slashes, which you could remove with tr -d if your particular application didn't like those chars. So, for example: echo "A great password"|md5sum|base64|tr -d /-|cut -c1-12 MjgwZTI1YWRl I just use the pwgen command (
splante · 482 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? 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.


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: