From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <98018144519964.tru64-unix-managers.marc@archive.invalid> From: "Myszkowski.Mark" Date: Mon, 22 Jan 2001 16:37:20 +0000 To: tru64-unix-managers Subject: SUMMARY: Generating Passwords X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=98018144519964 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_001_01C08491.9749E2A0" This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C08491.9749E2A0 Content-Type: text/plain; charset="iso-8859-1" My original question was: Does anyone know of a utility that could generate password strings for me automatically? These should be dictionary words. I received several URL's: http://www.elfqrin.com/pwgen.html http://www.users.dircon.co.uk/~crypto/download/c50-faq.html http://www.openwall.com/john/ http://freshmeat.net/redir/homepage/967691938/ A sample PERL script from Elizabeth Harvey-Forsythe: You can write a little perl script to do this quicky, call it makepassword.pl: #!/usr/bin/perl while () { chop; $plaintext = $_; $salt = "xx"; $encrypted = crypt($plaintext,$salt); print "$plaintext is $encrypted\n"; } Assuming your dictionary has 1 word per line, just cat your dictionary to it like so: bash-2.04$ cat dictionary.txt | ./makepasword.pl and watch the output scroll, or redirect to a file, whatever your heart desires. You may want to play with values for $salt, maybe derive them off the dictionary word or a random number generator. Also a sample PERL script and a sample KORN script from J.A. Gutierrez: --------------------------------------------------------------------------- #!/usr/local/bin/perl sub setupass { my $WORDS="/usr/share/dict/words"; my $LINES=25486+1; # 25486 is `wc -l < /usr/share/dict/words` my $LINE=int(rand($LINES)); chop($upass=`tail +$LINE $WORDS | head -1`); } setupass; print "$upass\n"; --------------------------------------------------------------------------- or --------------------------------------------------------------------------- #!/bin/ksh RANDOM=`date | /usr/local/bin/md5 | tr -d '[a-z]'` setupass() { WORDS=/usr/share/dict/words LINE=`expr $RANDOM \* $RANDOM` LINE=`expr $LINE % 25486` # 25486 is `wc -l < /usr/share/dict/words` upass="`tail +$LINE $WORDS | head -1`" } setupass echo "$upass" Plus a C program from Christophe DIARRA and a warning not to use dictionary words as passwords from Ann Majeske. Thank you to everyone who responded - this will make adding those several hundred users much easier. Mark ------_=_NextPart_001_01C08491.9749E2A0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable SUMMARY: Generating Passwords

My original question was:
Does anyone know of a utility that = could generate password strings for me automatically? These should be = dictionary words.

I received several URL's:
http://www.elfqrin.com/pwgen.html
http://www.users.dircon.co.uk/~crypto/download/c50-faq= .html
http://www.openwall.com/john/

http://freshmeat.net/redir/homepage/967691938/


A sample PERL script from = Elizabeth Harvey-Forsythe:
You can write a little perl script to = do this quicky, call it makepassword.pl:
#!/usr/bin/perl
while (<STDIN>)
{
chop;
$plaintext =3D $_;
$salt =3D "xx";
$encrypted =3D = crypt($plaintext,$salt);
print "$plaintext is = $encrypted\n";
}
Assuming your dictionary has 1 word = per line, just cat your dictionary to it like so:
bash-2.04$ cat dictionary.txt | = ./makepasword.pl
and watch the output scroll, or = redirect to a file, whatever your heart desires. You may want to play = with values for $salt, maybe derive them off the dictionary word or a = random number generator. =


Also a sample PERL script and a = sample KORN script from J.A. Gutierrez:


-------------------------------------------------------------------= --------
#!/usr/local/bin/perl


sub setupass
{
        my = $WORDS=3D"/usr/share/dict/words";
        my = $LINES=3D25486+1;
        # 25486 is `wc -l < = /usr/share/dict/words`
        my = $LINE=3Dint(rand($LINES));
        chop($upass=3D`tail = +$LINE $WORDS | head -1`);
}


setupass;
print = "$upass\n";
-------------------------------------------------------------------= --------
or
-------------------------------------------------------------------= --------
#!/bin/ksh


RANDOM=3D`date | = /usr/local/bin/md5 | tr -d '[a-z]'`

setupass()
{
        = WORDS=3D/usr/share/dict/words
        LINE=3D`expr $RANDOM \* = $RANDOM`
        LINE=3D`expr $LINE % = 25486`
        # 25486 is `wc -l < = /usr/share/dict/words`
        upass=3D"`tail = +$LINE $WORDS | head -1`"
}

setupass
echo "$upass"


Plus a C program from Christophe = DIARRA and a warning not to use dictionary words as passwords from Ann = Majeske.  Thank you to everyone who responded - this will make = adding those several hundred users much easier.

Mark

------_=_NextPart_001_01C08491.9749E2A0--