On Tue Aug 18 at 21:53 Jason L Tibbitts III pondered:
>Some quick questions:
>
>Anyone have code to generate a reasonable password randomly? I feel that
>assigning random garbage as initial passwords is just going to result in
>people not using them.
For some value of the word reasonable we use the PERL code at the end of
this message.
It generates 'pronouncable' passwords.
They are cVcDDcVc
where the c is a lower case consonant, the V an upper case VOWEL
and the D is of course a DIGIT.
It prints up a 'pronunciation' helper as well.
If people learn the patterns you can actually remember these kinds
of passwords. I do it all the time.
You will note that it doesn't use: 01,iOl This too helps avoid confusion
- Frank P. Bresz }*{
-----------
#!/usr/bin/perl
$c[1]=rand 19;
$c[2]=rand 19;
$v[1]=rand 4;
$v[2]=rand 4;
$c[3]=rand 19;
$c[4]=rand 19;
$d[1]=rand 8;
$d[2]=rand 8;
$cons = "bcdfghjkmnpqrstvwxz";
$vowel = "AEUY";
$digit = "23456789";
if ( $ARGV[0] ne "" ) {
print $ARGV[0];
print " ";
}
print substr $cons, $c[1], 1;
print substr $vowel, $v[1], 1;
print substr $cons, $c[2], 1;
print substr $digit, $d[1], 1;
print substr $digit, $d[2], 1;
print substr $cons, $c[3], 1;
print substr $vowel, $v[2], 1;
print substr $cons, $c[4], 1;
print "\t";
print substr $cons, $c[1], 1;
print substr $vowel, $v[1], 1;
print substr $cons, $c[2], 1;
print "-";
print substr $digit, $d[1], 1;
print substr $digit, $d[2], 1;
print "-";
print substr $cons, $c[3], 1;
print substr $vowel, $v[2], 1;
print substr $cons, $c[4], 1;
print "\n";
Follow-Ups:
References:
-
Quickies
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>
|
|