Announcement Announcement Module
Collapse
No announcement yet.
Modifying userPassword and authentication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Modifying userPassword and authentication

    Hi,

    I'm using spring-ldap 2 to build an application that can edit an existing user in a ldap (openldap) and change his password (stored in attribute userPassword). I want this password to be stored in md5.

    My application modify the password by providing the base64 encoded hash (example for password 'a') :
    context.setAttribute(newBasicAttribute("userPassword","{md5}DMF1ucDxtqgxw5niaXcmYQ=="));
    template.modifyAttributes(dn,context.getModificationItems());

    But every time i try to authenticate with a user which password was modified, i get an invalid credentials error. When i look at the userPassword attribute with Apache Directory Studio i get {md5}DMF1ucDxtqgxw5niaXcmYQ\=\= which means that the hash has been escaped... When i remove the '\' using apache directory, authentication works perfectly !

    Is this a known problem ? I don't understand because i've found a lot of example providing a new password this way.

    Thank you for your help.

    Arnaud

    Last edited by apezel; May 19th, 2014, 09:58 AM. Reason: authentication password
Working...
X