假设我有inetOrgPersonS IN ou=people,dc=example,dc=com。例:
dn: cn=John Doe,ou=people,dc=example,dc=com
objectClass: inetOrgPerson (structural)
objectClass: person (structural)
objectClass: top (abstract)
cn: John Doe
sn: Doe
givenName: John
mail: john.doe@example.com
uid: john.doe
Run Code Online (Sandbox Code Playgroud)
另外我还有几个organization:
dn: o=foo,dc=example,dc=com
objectClass: organization (structural)
objectClass:top (abstract)
o: foo
dn: o=bar,dc=example,dc=com
objectClass: organization (structural)
objectClass:top (abstract)
o: bar
Run Code Online (Sandbox Code Playgroud)
每个organization都有一个groupOfNames:
dn: cn=users,o=foo,dc=example,dc=com
objectClass:groupOfNames (structural)
cn: users
member: cn=John Doe,ou=people,dc=example,dc=com
dn: cn=users,o=bar,dc=example,dc=com
objectClass:groupOfNames (structural)
cn: users
Run Code Online (Sandbox Code Playgroud)
如您所见,cn=John Doe,ou=people,dc=example,dc=com列为的member,cn=users,o=foo,dc=example,dc=com而不是的dn: cn=users,o=bar,dc=example,dc=com。
我也要注意inetOrgPersons的成员资格。
memberOf目前不在我用于用户的架构中。是否有提供的架构memberOf?
member是的一部分,groupOfNames但这objectClass与冲突inetOrgPerson:
[LDAP: error code 65 - invalid structural object class chain (inetOrgPerson/groupOfNames)]
Run Code Online (Sandbox Code Playgroud)
如何记录cn=users,o=foo,dc=example,dc=comon 的会员资格cn=John Doe,ou=people,dc=example,dc=com?
如果您使用的是OpenLDAP,则需要使用“ memberof”覆盖,该覆盖在操作属性中维护一个真实的“ memberOf”属性。
请注意,它不会影响已经存在的成员资格,只会影响您首次加载叠加层时的新成员资格。请参阅OpenLDAP文档。
| 归档时间: |
|
| 查看次数: |
15031 次 |
| 最近记录: |