| Carsten Maul 2004-09-25, 5:55 pm |
| Hi,
I have a problem that really makes me crazy !
I want to use the libpam_mysql module. I have MD5 passwords stored in a
mysql table.
pam_mysql fetches the records correctly, but then it has to compare the
md5-hash from the table with the md5-hash created from the password
send to PAM.
pam_mysql uses the crypt() function to calculate the md5-hash from the
given password. But crypt() inside of pam_msql ALWAYS creates DES
hashes, even if the given salt is of the type $1$8charsalt$ (which
triggers crypt() to calculate a md5 hash), so the comparing of the
calculated hash and the retreived hash from the mysql table always
fails !
I first thought that perhaps woody crypt() only supports DES. But a
quick C programm showed that crypt() calculates the correct MD5-hash.
So woody crypt() works correctly, only inside of the pam_mysql context
it does not work. I donīt understand why.
I would be very pleased about any help, because I really have no clue
why this happens.
Carsten
|