directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Carlo.Acco...@ibs-ag.com>
Subject Trying to change password with Modify Request, 'Server will disconnect' LdapException thrown.
Date Sun, 03 Feb 2013 22:28:56 GMT
Hi, I'm trying to use a modify request to change the password so that I can process the response
the response if it doesn't' meet the password policy requirement.


connection is connected and authenticated as the user, not an admin.
 The pwdReset flag is set TRUE but there are remaining grace logins.

                                Entry entry = connection.lookup(dn);
              Attribute at = entry.get("userPassword");
              Modification mod = new DefaultModification( ModificationOperation.REPLACE_ATTRIBUTE,
at);

                     ModifyRequest modRequest = new ModifyRequestImpl();
                     PasswordPolicy ctrl = new PasswordPolicyImpl();
                     modRequest.addControl(ctrl);
                     modRequest.addModification(mod);
                     ModifyResponse modResponse = connection.modify(modRequest); // exception
thrown here..
                                                processResponse(modResponse);   //would like
to process the response controls from there so that the appropriate error can be raised to
the UI.

org.apache.directory.api.ldap.model.exception.LdapException: PROTOCOL_ERROR: The server will
disconnect!



Thanks!!

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message