Improved random password generator script

[EDIT, 2010-11-10:] After being kindly corrected by Chris Jones, I recommend instead using a readily available utility that is more feature rich to boot: pwgen.[/EDIT]

I have been using this script I wrote about a few years back to generate random passwords. It works, but it’s limited. I’ve written a new one that doesn’t have requirements other than Python 2.5 or higher, is more flexible and a bit easier to follow: randpass.py.

This script is very easy to use. Download it somewhere you keep handy scripts and make an alias like this:

1
alias randpass="~/code/code_homerepo/sysadmin/misc/randpass.py"

Source your .bashrc file (. ~/.bashrc) and try it out to quickly generate a password:

Be Sociable, Share!

Post to Twitter Post to Delicious Post to Digg Post to Reddit

This entry was posted in CLI and tagged , , . Bookmark the permalink.

2 Responses to Improved random password generator script

  1. Chris Jones says:

    There is also pwgen(1) which is in Debian and MacPorts at least :)

  2. Quite right! That is just what I was looking for. Somehow it escaped my Googling, which is pretty embarrassing. Well anyway, thanks for the info :-) Changing my bash alias now…

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>