From owner-freebsd-questions Mon Aug 7 19:51: 7 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 798C737B698 for ; Mon, 7 Aug 2000 19:51:01 -0700 (PDT) (envelope-from Tony.Irvine@env.qld.gov.au) Received: by inet03.citec.qld.gov.au; id MAA04333; Tue, 8 Aug 2000 12:50:54 +1000 (EST) Received: from sunbird.env.qld.gov.au( 147.132.224.6) by inet03.citec.qld.gov.au via smap (V2.0) id xma004013; Tue, 8 Aug 00 12:50:45 +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 AAA18252; Tue, 8 Aug 2000 12:48:22 +1000 Message-ID: <398F752A.4052A0A2@env.qld.gov.au> Date: Tue, 08 Aug 2000 12:49:14 +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 Cc: freebsd-questions@freebsd.org Subject: Re: Passwords without passwd... - CVS References: <20000807181112.11772.qmail@web3206.mail.yahoo.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Dan Fairs wrote: > Therefore, how does one go about generating passwords oneself, for CVS, > or any other system password-compatible system? I am very new to FreeBSD and not near my system so I can not confirm that this will work but here is the perl script I use to generate crypted passwords. I hope it is of some help. #!/usr/local/bin/perl -w use strict; srand (time() ^ ($$ + ($$ << 15))); # Gen a random salt my $salt = (chr(int(rand 57) + 65)).(chr(int(rand 57) + 65)); print "\n"; while (1) { system("stty -echo"); print "Password:"; chop(my $word = ); print "\n"; print "Again:"; chop(my $word2 = ); system("stty echo"); print "\n\n"; if ($word eq $word2) { print (crypt($word, $salt)); print "\n\n"; exit(1); } else { print "ERROR : Your two passwords did not match.\n\n"; } } -- 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