Announcement Announcement Module
Collapse
No announcement yet.
ldapTemplate.lookup can't return the really userpassword! Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ldapTemplate.lookup can't return the really userpassword!

    My Method:
    this.getLdapTemplate().lookup("uid=admin,ou=system ,dc=example,dc=com",
    new AttributesMapper()
    {
    public Object mapFromAttributes(Attributes attrs)

    throws NamingException
    {

    return attrs.get("userPassword").get();

    }
    }

    The return of the password is: [[email protected]

    but the Attribute[userPassword] in the OpenDS Server is
    {SSHA}DwCp64d0lOPqWpU4zfuCY9FmwGzieTa0bUXAhA==

    how can i get it?


    Other attributes:
    {mobile=mobile: 888, sn=sn: admin, userpassword=userPassword: [[email protected], displayname=displayName: admin, mail=mail: [email protected], objectclass=objectClass: person, organizationalPerson, inetOrgPerson, top, uid=uid: admin, cn=cn: admin, employeenumber=employeeNumber: 1, description=description: ddd}

  • #2
    You can't. SHA password are encrypted and you can't 'reverse' it.
    The only way is brute force, finding a password that has the same SHA hash.

    Comment

    Working...
    X