From Michael.Bennett@mail.esrin.esa.it Thu Aug 10 08:23:36 1995 Date: Thu, 10 Aug 95 08:26:16 +0200 From: Michael.Bennett@mail.esrin.esa.it (Michael Bennett SERCO ESA/ESRIN DPE/IO) Message-Id: <9508100626.AA09568@valhall.esrin.esa.it.> To: ulla@Stupi.SE Subject: Re: Password generator Content-Type: X-sun-attachment ---------- X-Sun-Data-Type: text X-Sun-Data-Description: text X-Sun-Data-Name: text X-Sun-Content-Lines: 37 Ciao Ulla My password generator has been sent out before, you must run it in a system that has the korn shell though. If you have the ksh shell in a directory other than /usr/bin, then you will need to edit the first line of the script. It is a script and the syntax is: random_generator It is very random on creating passwords, as it uses randoms to create randoms. May not be what you want, but it may be of use. Tell me if it could be improved. > From sun-managers-relay@ra.mcs.anl.gov Thu Aug 10 01:55:35 1995 > Sender: sun-managers-relay@ra.mcs.anl.gov > Date: Wed, 9 Aug 95 12:45:55 MET DST > From: Ulla Sandberg > Reply-To: Ulla Sandberg > Followup-To: junk > To: sun-managers@ra.mcs.anl.gov > Subject: Password generator > Content-Length: 144 > > > I`m looking for a password generator, something to generate new > passwords for a lot of accounts. > > > /Ulla > > Ulla Sandberg (ulla@stupi.se) > ---------- X-Sun-Data-Type: default-app X-Sun-Data-Description: default X-Sun-Data-Name: random_generator X-Sun-Content-Lines: 57 #!/usr/bin/ksh PASSWORDS_REQUIRED=$1 export PASSWORDS_REQUIRED CHAR_REQUIRED=$2 export CHAR_REQUIRED case "$PASSWORDS_REQUIRED" in [a-z]) echo "\n\tnew_generator: invalid argument" echo "\tnew_generator: no_of_passwords no_of_characters" exit ;; *) if [ "`echo $PASSWORDS_REQUIRED | wc -w`" -gt 1 -o "`echo $CHAR_REQUIRED | wc -w`" -gt 1 ] then echo "\n\tnew_generator: invalid number of arguments" echo "new_generator: no_of_passwords no_of_characters" exit else continue fi if [ "$PASSWORDS_REQUIRED" = "" -o "$CHAR_REQUIRED" = "" ] then echo "\n\tnew_generator: invalid argument" echo "\tnew_generator: no_of_passwords no_of_characters" exit fi ;; esac PASSWORDS_CREATED=0 until [ "$PASSWORDS_CREATED" = "$PASSWORDS_REQUIRED" ] do COUNT=0 ADD_STRING= STRING=6IpNqP1o9AwCiReOrQuZtF7y5JlMaLkGsW3dBjDf8VhXgSvYbT2zHxUmE4cnK0 until [ ${COUNT} = "$CHAR_REQUIRED" ] do NUMCOUNT=`expr $RANDOM \* $RANDOM | cut -c1,2` if [ "$NUMCOUNT" -ge 62 ] then NUMCOUNT=`expr $NUMCOUNT \/ 2 | awk -F. '{print $1}'` fi ADD_STRING=${ADD_STRING}`echo $STRING | cut -c${NUMCOUNT}` COUNT=`expr $COUNT + 1` export COUNT done echo $ADD_STRING echo $ADD_STRING >>PASSWORD_FILE PASSWORDS_CREATED=`expr $PASSWORDS_CREATED + 1` done