Here is a code fragment to use /dev/urandom to generate a random password of length 10 using bash; it should suffice for most needs.
head /dev/urandom | uuencode -m - | sed -n 2p | cut -c1-10
If openssl is installed, we may use:
openssl rand -base64 10 | cut -c1-10
No comments:
Post a Comment