Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Comparing current password with one generated through Crypt::PasswdMD5by c (Hermit) |
on Oct 11, 2001 at 23:56 UTC ( [id://118326]=perlquestion: print w/replies, xml ) | Need Help?? |
c has asked for the wisdom of the Perl Monks concerning the following question:
i am just now toying with using crypt::passwdmd5 and linux::passwd to create a script allowing users to change their existing passwords. however, i am trying to put some checking into the script to verify their existing password before accepting the new phrase. i have the following:
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.
and sure enough the return from the crypt::passwdmd5 is shorter than the passphrase generated by the system (RH 7.1) humbly -c
Back to
Seekers of Perl Wisdom
|
|