Home > SysAdmin > Quick OpenSSL Tip

Quick OpenSSL Tip

March 6th, 2006

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?

SysAdmin

  1. March 6th, 2006 at 23:06 | #1

    How about: `uuidgen | md5sum | cut -c-12`

  2. March 7th, 2006 at 10:46 | #2

    Now uuidgen I didn’t know about.

    Interestingly although they both use /dev/random uuidgen seems to be heavier on the numbers while base64 encoding /dev/random is heavier on the letters.

  1. No trackbacks yet.