Re: automatic password generation
john@dhh.gt.org writes:
> Daniel Martin writes:
> > I'm just curious - how are you going to do this? The best way I came up
> > with was: PASS=`head --bytes=16 /dev/urandom | md5sum`
>
> Clever, but it only produces hex. I want all letters and digits.
> This what I'm using:
>
> until [ `expr "$PASSWORD" : ".*"` -ge 8 ]
> do
> PASSWORD=`head -c 100 /dev/urandom | tr -dc '[:alnum:]' | head -c 8`
> done
Y'all do know about the pwgen and makepasswd packages, right?
--
James
Reply to: