Reputation: 1
I'm working on a Spring Boot 3.4.2 application where I'm integrating Active Directory (AD) via LDAP. I need to update a user's password using LDAP admin credentials, but I'm facing an issue:
The userPassword attribute is updated successfully. However, I can still log in with the old password, and the new password does not work.
Code I'm Using to Update the Password
DirContextOperations context = ldapTemplate.lookupContext(dn);
context.setAttributeValue("userPassword", newPassword);
ldapTemplate.modifyAttributes(context);
My Configuration (application.properties)
spring.ldap.urls=ldap://******:389
spring.ldap.base=dc=otbs,dc=local
spring.ldap.username=CN=Administrator,CN=Users,DC=otbs,DC=local
spring.ldap.password=******
Environment Details:
What I Have Tried:
Questions:
Any help would be greatly appreciated!
Upvotes: -2
Views: 34