8 messages in net.sourceforge.lists.courier-usersRe: [courier-users] MD5 passwords
FromSent OnAttachments
Mark BucciarelliJan 27, 2006 4:35 am 
Sergiy ZhukJan 27, 2006 9:43 am 
Mark BucciarelliJan 27, 2006 11:10 am 
Sam VarshavchikJan 27, 2006 3:19 pm 
Mark BucciarelliJan 29, 2006 9:24 am 
Jerry AmundsonJan 29, 2006 11:10 am 
Mark BucciarelliJan 30, 2006 2:21 pm 
Mark BucciarelliJan 30, 2006 6:34 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] MD5 passwordsActions...
From:Mark Bucciarelli (ma@gaiahost.coop)
Date:Jan 29, 2006 9:24:40 am
List:net.sourceforge.lists.courier-users

On Fri, Jan 27, 2006 at 06:22:33PM -0500, Sam Varshavchik wrote:

Mark Bucciarelli writes:

I'm having trouble getting the mysql authdaemond module to work with MD5 password hashes.

After "authtest myuser mypass", the log says:

authdaemond: supplied password 'mypass' does not match encrypted password ' {MD5}a029d0df84eb5549c641e04a9ef389e5

You need to use base64-encoding, not hex-encoding. Something like:

$ perl -e 'use Digest::MD5 qw(md5_base64); print "{MD5}" . md5_base64("mypass") . "\n";' {MD5}oCnQ34TrVUnGQeBKnvOJ5Q

I see.

Bummer. PHP's md5() uses hex-encoding. I wanted to auth against a Drupal user db.

What do think about the following proposed mod?

{MD5-16} - use base 16 encoding {MD5-randomstring} - use base 64 {MD5} - use base 64

I suppose you could also do {MD5-32} for completeness.

m