[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [K12OSN] Random Word Generator
- From: Scott Sherrill <scott hancock k12 mi us>
- To: k12osn redhat com
- Subject: Re: [K12OSN] Random Word Generator
- Date: Wed Nov 26 11:19:28 2003
Anyone know of a good (open source of course, or at least free...)
random word generator?
Our middle school students have forgotten their passwords so often,
that the principal wants me to assign a password to each student,
and then disable their ability to change 'em. Of course the catch
is that they need to be memorable, ie "dog, fish, wall, grass, tree,
bike, clock" -- not the most secure, but what we need...
Is there such a program? Should I just start looking in the dictionary?
Shawn,
What I would do is build your word list from one of the dictionaries
at ftp://ftp.ox.ac.uk/pub/wordlists or
ftp://ftp.cerias.purdue.edu/pub/dict
prune the list down to the X words you want to keep...most word lists
on those sites are going to include words I don't think you want.
Then a quick script to pull a random word from the dictionary (this
is untested code written as I go :-)
<code>
#!/usr/bin/perl
$userid="theuser";
open (DICTIONARY, "dictionary.txt") || die "Couldn't open dictionary file\n";
@wordsindictionary = <DICTIONARY>;
srand(time() ^ ($$ + ($$ << 15)) );
$rand= int rand($#wordsindictionary);
system "echo $wordsindictionary[$rand] | /usr/bin/password --stdin $userid"
print "The new password for $userid is $wordsindictionary[$rand]\n";
</code>
Again this is all off the cuff and guaranteed to break but its a start.
Scott
--
--
Scott Sherrill
Technology Coordinator Hancock Public Schools
Hancock, MI
http://www.hancock.k12.mi.us
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]