2 # Yes, we were storing passwords in plain text.
3 use Digest::MD5 qw/md5/;
8 opendir DATA, $datadir;
9 while (my $user = readdir(DATA)) {
10 next if $user =~ /^\./;
11 print "Processing $user\n";
12 open P, "$datadir/$user/password";
17 my $md5password = md5($user . $password);
19 rename "$datadir/$user/password", "$datadir/$user/password.old";
20 open P, ">$datadir/$user/password";