This is more anecdotal than the real answer ...
I had similar experience using Samba and OpenLDAP server. I could not find a library to really do what I wanted, so I turned my own helper classes upside down.
I used ldapbrowser to see which fields Samba filled in when I created the user βofficialβ method and basically duplicated this.
The only complex / non-standard version of LDAP was crazy password encryption:
UserPass:
"{MD5}" + Base64.encode64(Digest::MD5.digest(pass))
sambaNTPassword:
OpenSSL::Digest::MD4.hexdigest(Iconv.iconv("UCS-2", "UTF-8", pass).join).upcase
For the def authenticate(user, pass) function def authenticate(user, pass) I am trying to get LDAP to bind to the domain using my credentials, if I catch an exception, then the login will fail, otherwise enable them.
Lolindrath Dec 22 '08 at 20:43 2008-12-22 20:43
source share