An easy way to generate an 8-character printable ASCII password is
tr -cd '!-~' < /dev/urandom | head -8c; echo
Which, ignoring the "Broken pipe" complaints, produces such
memorable things as 2|,TQ~qU and +^_nBdid on my machine.
It's kind of wasteful to do it this way (tr -d just throws away bytes
that aren't good enough), but it works.
Really, /dev/[u]random are intended to provide *seed* material for
your own generator. 16 to 32 bytes is *plenty* for any purpose you
have in mind.
But still,
tr '\200-\377' '\0-\177' < /dev/urandom | tr -cd '!-~'
Will produce lots of ASCII gibberish. Slightly neater is
uuencode -m /dev/urandom /dev/urandom
Which has the virtue of not wasting anything.
-- -Colin- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu