JNDI Help regarding group group membership in Active Directory -


I am trying to add a group to a different group in Active Directory using a JNDI program. If I do this, I get the following error

[LDAP

: Error code 53 - 00002142: SvcErr: DSID-031A0FC0, Issue 5003 (WILL_NOT_PERFORM), Data 0

  1. Setting group attributes

  attribute = new BasicAttributes (true); Attrs.put ("objectClass", "group") attrs.put ("description", "a test group"); Adding group to different group   

  Try {Modified Member Member [  

] = New Modification Item [ 1]; Member [0] = New Modification Item (DirContext.ADD_ATTRIBUTE, New Basic Attribute ("Member", Group DN));

  ctx.modifyAttributes (grpDN, members); System.out.println ("group added to group:" + grpDN);  

} Hold (naming exception e) {System.err.println ("Problem adding group to group:" + E); }

I can add a user to a group using the same type of code (below).

  1. Setting user properties

  // Create attributes to connect with a new user attrs = new BasicAttributes (True); Attrs.put ("class", "user"); Attrs.put ("SAMAccountName", "Perry"); Attrs.put ("cn", "perry");  

attrs.put ("givenName", "Perry"); Attrs.put ("SN", "Perry"); Attrs.put ("displayName", "Perry Peterson"); Attrs.put ("description", "research engineer");

int UF_ACCOUNTDISABLE = 0x0002; Int UF_PASSWD_NOTREQD = 0x0020; Int UF_PASSWD_CANT_CHANGE = 0x0040; Int UF_NORMAL_ACCOUNT = 0x0200; Int UF_DONT_EXPIRE_PASSWD = 0x10000; Integer UF_PASSWORD_EXPIRED = 0x800000;

attrs.put ("userAccountControl", Integer.toString (UF_NORMAL_ACCOUNT + UF_PASSWD_NOTREQD + UF_PASSWORD_EXPIRED + UF_ACCOUNTDISABLE));

  1. Adding a user to a group

  Try {Modified subscribers} Member [] = new correction item [1]; Member [0] = new modification item (DirContext.ADD_ATTRIBUTE, new basic attribute ("member", userdien)); 

ctx.modifyAttributes (groupDN, members); System.out.println ("Users Added to the Group:" + groupName); } Hold (naming exception e) {System.err.println ("problem in adding users to group:" + e); Do anyone know about what I'm doing wrong here or there is such a special feature There is also an SSL connection between my JNDI client and server in terms of groups as groups, and I can successfully reset user password (which is probably not SSL)

me It's a doubt that this is happening because I have a group already created Not created from

Regards

Peri

Is happening because the groups are created by default as a security group and it is not possible to add groups to groups (in the case of security groups)

If you want to create a nested group, then the group is universal Create Distribution and then only you will be able to add groups to groups

This behavior is used for Active Directory New I do not know about the other directories.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -