On Thu, Jul 05, 2001 at 02:44:30PM -0000, [EMAIL PROTECTED] wrote:
> Hi,
>
> I already have a perl script that encrypts MD5 passwords (found in OpenLDAP FAQ).
>For my testing I used a C source code I recompiled, but it's not my real problem I
>guess : I compared hashed passwords with the ones given in RFCs and my program seems
>to be ok.
>
> My main problem stands in the syntax I have to use to set the userPassword value in
>the LDAP server.
> In my LDIF I use :
> userPassword: {MD5}X098f6bcd4621d373cade4e832627b4f6==
> Is this correct ? (should mean "test" in clear)
>
> thanks for your script and your attention !
>
Use digest provided by qmail-ldap patch:
./digest test
{MD4}2zRtaR16zE3CYl2xn54/Ug==
{MD5}CY9rzUYh03PK3k6DJie09g==
{RMD160}XlL+5H5rBwVl90NyRozcaZ3okQc=
{SHA}qUqP5cyxm6YcTAhz05Hph5gvu9M=
As you can see your hash is wrong, especially to long for md5.
md5 is a 128 Bit hash -> 16 bytes to base 64 -> ceil(16/3)*4 = 24 chars
Yours is 35 Chars long (which is definitifly bad).
--
later
Claudio
mailto:[EMAIL PROTECTED]