LDAP authentication problems and more

Hi, I’m using asterisk 1.8 and I have the following problems:

LDAP authentication is not working properly: I map md5secret to the “userPassword” attribute in my LDAP users directory, but when I do this my devices wont authenticate (wrong password error). BUT, if I map md5secret to a non existent attribute, my devices will authenticate succesfully indepently of the password.

So, after seeing some debug logs of asterisk and the online documentation, I assumed that maybe asterisk is not expecting the password to be base64, but to be a string representation of the md5 hash, so I edited res_config_ldap.c and compiled it (basicly, I’m base64-decoding the hash and converting it to a hex-string representation).
After I put the new res_config_ldap.so in the modules directory, Asterisk complain that the ldap module was compiled in a different time of the rest of the system, and refuses to load the module. I looked in the internet and found no information on how to force loading a module with different compilation time.
So, I compiled the whole thing and tried to reinstall. BUT… now asterisk refuses to start, it exits with status 0 as soon as it starts. I double checked asterisk.conf and everything is pointing to the right place.

So, my questions are:

  • What is the format or encoding that asterisk expects from LDAP? (openldap returns the md5 hash in base64)
  • How can I force asterisk to load a module compiled in another time?
  • Why asterisk would refuse to start after a successful compile and instalation? (no messages in log/asterisk/messages)

**EDIT: the problem with asterisk not starting was a module conflict. Now it starts, but I cant get the password right. So now the only question would be:

  • What is the format or encoding that asterisk expects from LDAP? (openldap returns the md5 hash encoded with base64)

I hope anyone can help me.

Sorry my english quality.


Ok, I soved it

magazine.redhat.com/2008/07/24/o … -asterisk/