0

I cannot add uniqueMembers to a static group (objectClass: groupOfUniqueNames)

According to this documentation:

Modifying group entries: In order to add a member to a static group, add the user's distinguished name as an additional value for the member or uniqueMember attribute. Following is an example: ldapmodify -h 127.0.0.1 -D "cn=admin" -w xxxx -f modStaticGrp.ldif

Where modStaticGrp.ldif contains:

dn: cn=group1, o=Your Company
changetype: modify
add: member
member: cn=jeff, cn=tim, o=Your Company

dn: cn=group2, o=Your Company
changetype: modify
add: uniqueMember
uniqueMember: cn=joe,o=Your Company

When I try to add a uniqueMember with ldapmodify with the following ldif file:

dn: cn=Private,o=My Company
changetype: modify
add: uniqueMember 
uniqueMember: uid=1234567890,ou=My Company

I get the error:

ldapmodify: wrong attributeType at line 4, entry "cn=Private,o=My Company”

What am I missing? Any ideas?

Garrett Hyde
  • 5,409
  • 8
  • 49
  • 55
Pocoyo
  • 1
  • 1
  • 2

1 Answers1

1
uid=1234567890,ou=My Company

A uniqueMember value is a complete DN. Judging by the rest of your DNs this should be something like

uid=1234567890,o=My Company

although I woudl have expected to see something more like this:

uid=1234567890,ou=Users,o=My Company

actually, depending on exactly how you've designed your DIT. You shouldn't be adding user entries at its top level.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • My misstake, the users are located under ou=People. So the last line should be: uniqueMember: uid=1234567890,ou=People,o=My Company – Pocoyo Nov 06 '14 at 07:01