Quick OpenSSL Tip

here is how I create random passwords.

head -c 8 /dev/random > /tmp/xxx
openssl enc -base64 -in /tmp/xxx | head -c 8

is there a better way?