Date: Tue, 08 Aug 2000 13:30:49 +1000 From: Tony.Irvine@env.qld.gov.au (Tony Irvine) To: Dan Fairs <danfairs@yahoo.co.uk>, freebsd-questions@freebsd.org Subject: Re: Passwords without passwd... - CVS Message-ID: <398F7EE9.81F0E835@env.qld.gov.au> References: <20000807181112.11772.qmail@web3206.mail.yahoo.com> <398F752A.4052A0A2@env.qld.gov.au>
next in thread | previous in thread | raw e-mail | index | archive | help
Tony Irvine wrote: > # Gen a random salt > my $salt = (chr(int(rand 57) + 65)).(chr(int(rand 57) + 65)); Actally this does not do exactly what it should. The salt (the first two chars of a crypted passwd) should be two chars from the set [a-zA-Z0-9./]. I was feeling lazy when I wrote that script so it does not actually do that. To fix it replace the above line with these two: my @chars = ('a'..'z','A'..'Z',0..9,'.','/'); my $salt = $chars[int(rand 64)].$chars[int(rand 64)]; Sorry about that. Cheers, Tony -- Tony Irvine, Project Officer (Web) Environmental Protection Agency Tel:(07)3227-7991 Fax:(07)3227-6534 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?398F7EE9.81F0E835>