c has asked for the wisdom of the Perl Monks concerning the following question:
if ($info[1] ne unix_md5_crypt($current, $salt)) { print "\nThe password you entered does not match your current passph +rase!\n\n"; exit; }
now $info[1] is the value of the user's current encrypted password taken from /etc/shadow and $current is the chomp'd input from STDIN that the user provided for his/her current password.
i've added
print "$info[1]\n"; print unix_md5_crypt($current, $salt);
and sure enough the return from the crypt::passwdmd5 is shorter than the passphrase generated by the system (RH 7.1)
any suggestions on keys that i may have missed?
humbly -c
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Comparing current password with one generated through Crypt::PasswdMD5
by wog (Curate) on Oct 12, 2001 at 00:29 UTC | |
|
Re: Comparing current password with one generated through Crypt::PasswdMD5
by no_slogan (Deacon) on Oct 12, 2001 at 00:16 UTC |