easy way to create a random password
Sometimes you just need a quick way to create a random password without installing special random password generators.
Here is an easy way to create a random password using standard tools that are available on most of the unix flavours:
head -c 10 /dev/random | base64
or if you don't have the base64 program but you have uuencode
head -c 10 /dev/random | uuencode -m -
This will create a password based on a 10 bytes long random sequence.
If you want longer or shorter passwords just replace "-c 10" with "-c x", where x is the number of random bytes you want to use.
If you enjoyed this post, you should subscribe to my full RSS Feeds












Add New Comment
Thanks. Your comment is awaiting approval by a moderator.
Do you already have an account? Log in and claim this comment.
Add New Comment