Results 1 to 3 of 3

Thread: Updating password / unicodepwd fails

  1. #1
    Join Date
    Sep 2010
    Posts
    16

    Default Updating password / unicodepwd fails

    Hi,

    We are using Spring LDAP 1.3.1 to create and modify user records on an Active Directory on Windows 2008. We use the SSL connection when required (e.g. to initially set the password for a user we are creating)

    Now we are trying to implement a "update password" functionality and running into an issue. We can successfully update all of the other user attributes except password. Is there a special way we need to do this using Spring LDAP?


    Code:
    DirContextOperations context = simpleLdapTemplate.lookupContext( buildDn( identifier ) );
    
    try {
             context.setAttributeValue( "unicodepwd", encodePassword( myNewPassword ) );
             //context.setAttributeValue( "userPassword", myNewPassword);
           } catch( UnsupportedEncodingException uee ) { 
             throw uee;
           }
    
    // THIS LINE THROWS EXCEPTION
    simpleLdapTemplate.modifyAttributes( context );
    The last line results in the following Exception

    Code:
    org.springframework.ldap.AttributeInUseException: [LDAP: error code 20 - 0000207E: AtrErr: DSID-03190647, #1:
           0: 0000207E: DSID-03190647, problem 1006 (ATT_OR_VALUE_EXISTS), data 0, Att 9005a (unicodePwd)


    Thanks for your help.

  2. #2
    Join Date
    Sep 2010
    Posts
    16

    Default

    Just an update: we were able to successfully change the password using the native Microsoft tools using the same "admin" user our Spring LDAP implementation uses. It doesn't seem to be a permissions issue... Is there anything special about Spring LDAP handling of passwords? Has anyone tested updating passwords?

    Thanks.

  3. #3
    Join Date
    Nov 2010
    Posts
    2

    Default encodePassword

    Could you post your encodePassword() ?

    you might want to talk a look at this post:
    http://forum.springsource.org/showthread.php?t=99013
    Last edited by thai; May 5th, 2011 at 01:10 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •