[Date Prev][Date Next] [Chronological] [Thread] [Top]

Password-hash and pam_ldap

Hi everybody,

i'm a little confused about how password-hashes are used
in conjunction with pam_ldap.

What i want is to store the password in MD5-format.

Example :

[server /etc]# /usr/local/ldap-2.1.x/sbin/slappasswd -h {MD5}
New password:
Re-enter new password:
[server /etc]#

If i put this hash into the attribute userpassword (posixaccount)
i can authenticate with my chosen password.

When i change the password with passwd it comes to troubles :

[vasuser@server vasuser]$ passwd
old password:
 type new password:
again new password:
password changed for vasuser
passwd: all authentication tokens updated successfully
[vasuser@server vasuser]$

So, now i`ll look, what's the new value :

[server /] # ldapsearch -H "ldaps://server" -b "dc=abc,dc=def"
-s sub -x -D "cn=bla" -W  "(objectclass=*)"


cn: vasuser
userPassword:: e1NNRDV9V2lXUEo4S1ZiT0EzOW1IaDZRRk9Qem15UjlzPQ==


Let's look what the password looks like :


[server /] # echo -n
e1NNRDV9V2lXUEo4S1ZiT0EzOW1IaDZRRk9Qem15UjlzPQ==|mmencode -u
[root@fra10000144 pam_ldap-156]# 


You see, its's hashed with SMD5 which is not what i want.
(What i really want is to know how i can configure it,
so the hash i want is used ..)

So, here's what's in my pam_ldap.conf 
(which is the file that configures pam_ldap.so) :

host server

base o=webservices,dc=abcd,dc=efg

ldap_version 3

pam_password exop
ssl on

tls_checkpeer yes

tls_cacertfile /usr/local/ldapcert/cacert.pem
tls_cert /usr/local/ldapcert/ldapcert.pem
tls_key /usr/local/ldapcert/ldapkey.pem
ssl yes 


First, i tried 
pam_password MD5
(in pam_ldap.conf)
but this gave me the following 

[server /]# echo-n
e2NyeXB0fSQxJC9waXVWS2tQJFB6b2J2TFU4Vk52aHc5R1NtQWc3cy4=|mmencode -u
[server /]# 

So, what the hell is this, i tried to force MD5 and what i get is  {crypt}

I tried different configurations,
but i never got it to hash with MD5, where's my mistake ?

greets Harry

+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!