[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:










There is also pwgen(1) which is in Debian and MacPorts at least
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…