To generate a random string/password of 32 chars using /dev/urandom:
/dev/urandom
$ base64 /dev/urandom | head -c 32