directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Trying to change password with Modify Request, 'Server will disconnect' LdapException thrown.
Date Mon, 04 Feb 2013 02:29:28 GMT
Le 2/3/13 11:28 PM, Carlo.Accorsi@ibs-ag.com a écrit :
> 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!!
>
JIRA created : https://issues.apache.org/jira/browse/DIRAPI-119

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message