generating random passwords

Nikos Vassiliadis nvass at teledomenet.gr
Wed Jun 11 07:59:00 UTC 2008


On Wednesday 11 June 2008 10:20:30 Zbigniew Szalbot wrote:
> Excuse me my ignorance. Is there a utility in FreeBSD that would allow
> me to generate random passwords without actually creating any accounts
> or modifying existing ones? I am looking for something to allow me to
> generate a random string of characters. I know I can randomly hit the
> keyboard but if anything like that exists, many thanks for your advice.
> :)

That's a common problem I have, and most of the times I was on relying
on BASH's $RANDOM. Just thought of this:
sed -n 's/[^a-zA-Z0-9~`!@#$%^&*()_+=-|\]//g; /^\(.\{10\}\).*/{ s//\1/p; q; }; b' /dev/urandom

HTH, Nikos


More information about the freebsd-questions mailing list