From owner-freebsd-questions Mon Aug 7 20:32:32 2000 Delivered-To: freebsd-questions@freebsd.org Received: from inet03.citec.qld.gov.au (inet03.citec.qld.gov.au [203.5.10.10]) by hub.freebsd.org (Postfix) with ESMTP id F389A37B506 for ; Mon, 7 Aug 2000 20:32:26 -0700 (PDT) (envelope-from Tony.Irvine@env.qld.gov.au) Received: by inet03.citec.qld.gov.au; id NAA13583; Tue, 8 Aug 2000 13:32:23 +1000 (EST) Received: from sunbird.env.qld.gov.au( 147.132.224.6) by inet03.citec.qld.gov.au via smap (V2.0) id xma013440; Tue, 8 Aug 00 13:32:19 +1000 Received: from env.qld.gov.au ([147.132.242.193]) by sunbird.env.qld.gov.au (Netscape Mail Server v3.0) with ESMTP id AAA31544; Tue, 8 Aug 2000 13:29:56 +1000 Message-ID: <398F7EE9.81F0E835@env.qld.gov.au> Date: Tue, 08 Aug 2000 13:30:49 +1000 From: Tony.Irvine@env.qld.gov.au (Tony Irvine) Organization: Environmental Protection Agency X-Mailer: Mozilla 4.7 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Dan Fairs , freebsd-questions@freebsd.org Subject: Re: Passwords without passwd... - CVS References: <20000807181112.11772.qmail@web3206.mail.yahoo.com> <398F752A.4052A0A2@env.qld.gov.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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