[COMP] Re: perl crypt() and MD5?
- From: <weez@xxxxxxxxxxxxx>
- To: <computers@xxxxxxxxxxxxx>
- Date: Tue, 20 Nov 2001 16:06:45 -0500 (EST)
> It works fine on a debian box with DES passwds
> but there is a Mandrake machine I wanted to run
> it on which uses MD5 instead.
> $salt = substr($user, 0, 2);
> chop($word = <STDIN>;
>
> if (unix_md5_crypt($word, $salt) eq $user) {
> print "$line[0]: yes\n";
MD5-based crypt() uses an 8-character salt.
> One other thing - how insane would it be to
> later on extend this to a cgi that would allow
> people (who don't even know what 'shell' means)
> to change their passwds via a webpage?
Locking the file properly may cause you issues -- I'd suggest not doing
it, unless there's some cool way of doing it through PAM...
John
- Follow-Ups:
- [COMP] Re: perl crypt() and MD5?
- From: Mark Symonds
- References:
- [COMP] Re: perl crypt() and MD5?
- From: Mark Symonds
Other related posts:
- » [COMP] Re: perl crypt() and MD5?
- » [COMP] Re: perl crypt() and MD5?
- » [COMP] Re: perl crypt() and MD5?
- [COMP] Re: perl crypt() and MD5?
- From: Mark Symonds
- [COMP] Re: perl crypt() and MD5?
- From: Mark Symonds