On Tuesday January 30 2007 3:24 pm, Sam Varshavchik wrote:
> Jason Flatt writes:
> > mail authdaemond: supplied password 'password' does not match encrypted
> > password '{MD5}283581d9ae7793e1e906c0672a015d0b'
> >
> > So my second question is am I constructing the query correctly?
>
> Yes, but it is irrelevant. You are storing md5 hashes as hexadecimal,
> while Courier expects hashes to be base64-encoded.
>
> Hexadecimal encoding is a completely non-standard way of storing password
> hashes. Everyone else: Courier, PAM, LDAP, uses base64 encoding.
Hmm, it seems that the PHP md5 function does exactly that. From
http://www.php.net/manual/en/function.md5.php :
"string md5 ( string str [, bool raw_output] )
Calculates the MD5 hash of str using the RSA Data Security, Inc. MD5
Message-Digest Algorithm, and returns that hash. The hash is a 32-character
hexadecimal number. If the optional raw_output is set to TRUE, then the md5
digest is instead returned in raw binary format with a length of 16.
Note: The optional raw_output parameter was added in PHP 5.0.0 and defaults
to FALSE"
I guess I'll have to see if I can figure out a different way to make this
happen.
--
Jason Flatt
Father of Six: http://www.flattfamily.com/ (Joseph, 13; Cramer, 11; Travis,
9; Angela; Harry, 5; and William, 12:04 am, 12-29-2005)
Linux User: http://www.sourcemage.org/
Drupal Fanatic: http://drupal.org/
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users