Secure password generation

Sunday, 19 Dec 2004

This script suggests secure passwords:

#!/bin/sh
< /dev/urandom tr -cd '[:alnum:]$!@_:=-' | head -c "${1:-32}"
echo

You can pass a parameter to specify a length other than the default 32 characters.

Obviously these are impossible to memorise, so file them away in a GPG-encrypted list.