/dev/urandom

To generate a random string/password of 32 chars using /dev/urandom:

$ base64 /dev/urandom | head -c 32