From: "Myszkowski.Mark" <Mark.Myszkowski () wepco ! com>
To: tru64-unix-managers
Subject: SUMMARY: Generating Passwords
Date: Mon, 22 Jan 2001 16:37:20 +0000 [thread overview]
Message-ID: <98018144519964.tru64-unix-managers.marc@archive.invalid> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: multipart/mixed; boundary="------_=_NextPart_001_01C08491.9749E2A0", Size: 8752 bytes --]
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 (<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
------_=_NextPart_001_01C08491.9749E2A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2650.12">
<TITLE>SUMMARY: Generating Passwords</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2 FACE=3D"Arial">My original question was:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Does anyone know of a utility that =
could generate password strings for me automatically? These should be =
dictionary words.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Arial">I received several URL's:</FONT>
<BR><U><FONT COLOR=3D"#0000FF" FACE=3D"Times New Roman"><A =
HREF=3D"http://www.elfqrin.com/pwgen.html" =
TARGET=3D"_blank">http://www.elfqrin.com/pwgen.html</A></FONT></U>
<BR><FONT SIZE=3D2 FACE=3D"Courier New"><A =
HREF=3D"http://www.users.dircon.co.uk/~crypto/download/c50-faq.html" =
TARGET=3D"_blank">http://www.users.dircon.co.uk/~crypto/download/c50-faq=
.html</A></FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New"><A =
HREF=3D"http://www.openwall.com/john/" =
TARGET=3D"_blank">http://www.openwall.com/john/</A></FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New"><A =
HREF=3D"http://freshmeat.net/redir/homepage/967691938/" =
TARGET=3D"_blank">http://freshmeat.net/redir/homepage/967691938/</A></FO=
NT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">A sample PERL script from</FONT> =
<FONT SIZE=3D2 FACE=3D"Arial">Elizabeth Harvey-Forsythe</FONT><FONT =
SIZE=3D2 FACE=3D"Courier New">:</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">You can write a little perl script to =
do this quicky, call it makepassword.pl:</FONT><FONT FACE=3D"Times New =
Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">#!/usr/bin/perl</FONT><FONT =
FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">while (<STDIN>)</FONT><FONT =
FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">{</FONT><FONT FACE=3D"Times New =
Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">chop;</FONT><FONT FACE=3D"Times New =
Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">$plaintext =3D $_;</FONT><FONT =
FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">$salt =3D "xx";</FONT><FONT =
FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">$encrypted =3D =
crypt($plaintext,$salt);</FONT><FONT FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">print "$plaintext is =
$encrypted\n";</FONT><FONT FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">}</FONT><FONT FACE=3D"Times New =
Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">Assuming your dictionary has 1 word =
per line, just cat your dictionary to it like so:</FONT><FONT =
FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">bash-2.04$ cat dictionary.txt | =
./makepasword.pl</FONT><FONT FACE=3D"Times New Roman"> </FONT>
<BR><FONT SIZE=3D2 FACE=3D"Arial">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.</FONT><FONT FACE=3D"Times New Roman"> =
</FONT></P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">Also a sample PERL script and a =
sample KORN script from J.A. Gutierrez:</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier =
New">-------------------------------------------------------------------=
--------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">#!/usr/local/bin/perl</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">sub setupass</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">{</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> my =
$WORDS=3D"/usr/share/dict/words";</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> my =
$LINES=3D25486+1;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> # 25486 is `wc -l < =
/usr/share/dict/words`</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> my =
$LINE=3Dint(rand($LINES));</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> chop($upass=3D`tail =
+$LINE $WORDS | head -1`);</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">}</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">setupass;</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">print =
"$upass\n";</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">-------------------------------------------------------------------=
--------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">or</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New">-------------------------------------------------------------------=
--------</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">#!/bin/ksh</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">RANDOM=3D`date | =
/usr/local/bin/md5 | tr -d '[a-z]'`</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New">setupass()</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">{</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> =
WORDS=3D/usr/share/dict/words</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> LINE=3D`expr $RANDOM \* =
$RANDOM`</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> LINE=3D`expr $LINE % =
25486`</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> # 25486 is `wc -l < =
/usr/share/dict/words`</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier =
New"> upass=3D"`tail =
+$LINE $WORDS | head -1`"</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">}</FONT>
</P>
<P><FONT SIZE=3D2 FACE=3D"Courier New">setupass</FONT>
<BR><FONT SIZE=3D2 FACE=3D"Courier New">echo "$upass"</FONT>
</P>
<BR>
<P><FONT SIZE=3D2 FACE=3D"Courier New">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.</FONT></P>
<P><FONT SIZE=3D2 FACE=3D"Courier New">Mark</FONT>
</P>
</BODY>
</HTML>
------_=_NextPart_001_01C08491.9749E2A0--
reply other threads:[~2001-01-22 16:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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