SUMMARY: Generating Passwords

From: Myszkowski.Mark <Mark.Myszkowski_at_wepco.com>
Date: Mon, 22 Jan 2001 10:37:20 -0600

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 = $_;
$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
Received on Mon Jan 22 2001 - 16:38:55 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:41 NZDT