Problems? Is your data what you think it is? | |
PerlMonks |
Re: UNIX user authenticationby fokat (Deacon) |
on Oct 31, 2001 at 21:09 UTC ( [id://122376]=note: print w/replies, xml ) | Need Help?? |
crypt() is smart enough to know about getting the salt out of the crypted password. You can try something along these lines:
Which I think is considerably simpler and more portable. The code snippet you supplied will not work when the crypt() function in your system does not use a DES-based transformation. If you need support for other crypt() methods (MD5 or Apache), I suggest you take a look at Crypt::Passwd* Good luck.
In Section
Seekers of Perl Wisdom
|
|