From: erik@pax10f.mipool.uni-jena.de (Erik Braun)
Subject: Re: Adding passwords from a script
Date: 1998/04/21 [thread overview]
Message-ID: <slrn6joiu0.3bt.erik@pax10f.mipool.uni-jena.de> (raw)
In-Reply-To: 353b7a65.81524045@news3.buffnet.net
On Fri, 17 Apr 1998 15:51:19 GMT, Jeffrey Sick <wolfanger@wolfcrews.com>
wrote:
>I figured out a way to add hundreds of users at a time to a DEC UNIX
>4.0D / C2 server at a time using a script but I can't find a way of
>the password being added as well. Does anyone know of a method of
>doing this?
You may use this Perl subroutine:
# $pwd must be the uncrypted password
$cryptpwd=crypt($pwd,$salt);
sub saltchar {
$rc=rand(62);
if ($rc<25) { $rc+=65; } # 0-24 goes A-Z
elsif ($rc<50) { $rc+=72; } # 25-49 goes a-z
else { $rc-=4; } # 50-61 goes ./0-9
$rc;
}
Hope this helps,
Erik
--
erik@minet.uni-jena.de
next prev parent reply other threads:[~1998-04-21 4:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-04-17 4:00 Adding passwords from a script Jeffrey Sick
1998-04-18 4:00 ` Nikola Milutinovic
1998-04-21 4:00 ` Erik Braun [this message]
1998-04-21 4:00 ` Erik Braun
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox