title: Java LDAP - Add group to user issue - Error code 53 - WILL_NOT_PERFORM
body: <p>I am trying to add an user into Active Directory.<br>
  Having in mind:  </p>
  
  <ul>
  <li>Using SSL  </li>
  <li>Certificate ok  </li>
  <li>Password works fine</li>
  </ul>
  
  <p>With out group association, the user is correctly created.  </p>
  
  <p>When I try to associate the user to a group I get the following error:<br>
  javax.naming.OperationNotSupportedException: [LDAP: error code 53 - 0000209A: SvcErr: DSID-031A1021, problem 5003 (WILL_NOT_PERFORM), data 0</p>
  
  <p>I have used the DN and NAME group attributes but none worked. 
  My code is:  </p>
  
  <pre><code>    ctx = getContext();
      ctx.createSubcontext(entryDN,entry); // it works fine
  
      Attribute memberOf1 = new BasicAttribute("memberOf","NAME_OF_THE_GROUP");
      Attributes atts     = new BasicAttributes();
      atts.put(memberOf1);
      ctx.modifyAttributes(entryDN, LdapContext.ADD_ATTRIBUTE, atts); // ## it doesn't work
  </code></pre>
  
  <p>I tried LdapContext.ADD_ATTRIBUTE and  LdapContext.REPLACE_ATTRIBUTE.
  Also, I tried to add the group with the other attributes but all situation gave me the same error.</p>
  
  <p>Does anyone have any idea what is going on?</p>
  
  <p>Cheers!</p>