I believe it uses unix crypt. Try crypting $pw_passwd in the program itself
and then checking for that one. Actually that wouldn't make sense to do it
before. Okay- Try getting just where pw_name=$pw_name. You will then have
the encrypted password. substr the first two characters off of it. This is
your SALT. then run crypt() with the entered password and the salt you
pulled off of the encrypted password. If they match, you're user is good.
If they don't, password fail. MySQL has it's own password() scheme. Also,
shouldn't you have a domain in that query string somewhere?
--
Mike
----- Original Message -----
From: "Toph Kemmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 01, 2001 12:09 PM
Subject: password(); vpopmail mysql php??
> Hi,
> I�m using vpopmail 5 and I try to check the mysql-passwords of the user
> with PHP 4:
>
> SELECT * FROM vpopmail WHERE pw_name='$pw_name' AND pw_passwd =
password('$pw_passwd')
>
> Result is always "0", no errors, does anyone know, why ?? Does the
> mail prog use a different method to generate the passwords ?
>
> Thanks
>
> Toph
> [EMAIL PROTECTED]
>
>
>