>> Username is no problem, the Unix encrypted
>> password is the one I am trying to work out. If the user has a
>> password of: phprocks and in /etc/passwd
>> that encrypted password works out to be: !#@KJCKMSD@, then I
>> validate the user, they enter the correct username and password,
>> will PHP be able to validate that the password they entered matches
>> the encrypted password.
Just as Peter said, you can use crypt to check the passwords, it'll be
something like:
if ( '!#@KJCKMSD@' == crypt( 'phprocks', substr( 'phprocks', 0, 2 ) ) )
{
// Validation succeeded
}
else
{
// Invalid password
}
Crypt can not be unencrypted, but you can of course compare the crypted
passwords...
HTH
Erwin
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php