wood burning stoves 2.0*
The moose likes Java in General and the fly likes Help to solve reset User LDAP problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Help to solve reset User LDAP problem" Watch "Help to solve reset User LDAP problem" New topic
Author

Help to solve reset User LDAP problem

Huong NguyenB
Greenhorn

Joined: May 25, 2011
Posts: 2
Hi members,
I 've wrote a java class to change user password by LDAP, I used code in this forum for reference, but when running, It created an error. Please help me to solve this.
Thanks a lot.
These errors are here:
Test
So ngau nhien: 54g0o7i5
OK
OK2
OK3
>>>1CN=Nguyen Thi Thu Huong,OU=KTTH,OU=C5
OK4
OK5
Test: [Ljavax.naming.directory.ModificationItem;@ca2dce
Sr: CN=Nguyen Thi Thu Huong,OU=KTTH,OU=C5: null:null:{objectcategory=objectCategory: CN=Person,CN=Schema,CN=Configuration,DC=vms,DC=com,DC=vn, userparameters=userParameters: m: d , whencreated=whenCreated: 20080915103229.0Z, badpwdcount=badPwdCount: 0, mdbusedefaults=mDBUseDefaults: TRUE, codepage=codePage: 0, mail=mail: huongntt@vms.com.vn, objectguid=objectGUID: ?s/??M?-??, msexchuseraccountcontrol=msExchUserAccountControl: 0, msexchmailboxsecuritydescriptor=msExchMailboxSecurityDescriptor: 
....
Problem resetting password: javax.naming.NameNotFoundException: [LDAP: error code 32 - 0000208D: NameErr: DSID-031001CD, problem 2001 (NO_OBJECT), data 0, best match of:
'DC=vms,DC=com,DC=vn'... remaining name 'cn=LDAP://10.151.151.11/DC=vms,DC=com,DC=vnhuongntt'

Here is my code
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3415
    
  12
You need to print out the distinguished name of the user you are trying to modify.
Add
before the ctx.modifyAttributes line and check that it is correct. The error is saying the user can't be found.

I don't want to discourage you too much, but using LDAP to change the password of an Active Directory user is a real pain. Good luck.


Joanne
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help to solve reset User LDAP problem
 
Similar Threads
Error occured while modifying "pwdLastSet" attribute in Active Directory
LDAP on websphere app server 7 problem
LDAP AD - Autentication SSL
Change Ldap Password
Password Change on Ldap keep on failing