From: Florian V. <flo...@un...> - 2003-05-14 23:28:45
|
Hi all! MD5 crypted passwords work fine under Linux. (I've tested it, but not employing it regularly) These are passwords like these in the /etc/shadow file in the form of '$1$<slat>$<cryptedpasswd>'. For encoding the password, the 'crypt' function is used (as for DES passwords). See sourcecode of pam_mysql module, lines 563 to 573. But passwords using MD5 hash seem to work only under FreeBSD! This is an other technique. The hash is used as encoded password (If I understand it well, it's something like a md5sum (?) ). I tried a while to use the MD5 functions of the pam_unix module, but I was not able do compile/link it to something workable :-/ Did you use 'crypt=3D1' in your /etc/pam.d/xxx configuration? 'crypt=3D1' is used for both, DES and MD5 crypted passwords! The pam_mysql detects automatically which one it was (except for changing password -> cf. md5=3D0/1) 'crypt=3D3' is only for MD5 hash passwords - and seems to work only on FreeBSD... Hope this helped you. If not: Try hacking the sourcecode to show the (encrypted) passwords in the log... ex: add at line 589: syslog(LOG_ERR, "***DEBUG: MySQL:%s given:%s",row[0],encryptedPass); /* ATTENTION: ONLY FOR DEBUGGING! */ ________________________________________ \|justin <ge...@vi...> ha scrit als 14 May 2003 18:48:12 -0400: |Anyone have pam_mysql working with md5 passwords on linux? From the |logs, I can see it querying the passwords from mysql but it always |returns as incorrect password.=20 | PS: A few weeks ago, I mentioned on this list, that MD5 could not be working with the source code distributed... I was completely false! -> SORRY! ('char passwdcolumn[17]' (line 67) holds the _name_ of the column, not the password itself!) sincerly, blers sal=FCds, _________=20 Florian Verdet GnuPG: fvg.zapto.org/informatica/gpg.php . |