我在使用ldapadd和ldif文件导入用户时遇到问题.我得到的错误是:
ldap_add: Constraint violation (19) additional info: structuralObjectClass: no user modification allowed
导入的用户都是ou = People,dc = example,dc = org的一部分. LDAP服务器已包含此基本DN.
/etc/ldap/slapd.d/cn=config/olcDatabase={1}hdb.ldif文件包含以下ACL条目:
olcAccess: {2}to dn.base="ou=People,dc=example,dc=org" attrs=children by gr oup.exact="cn=Manager,ou=Roles,dc=org" manage
ldif文件导入如下:
ldapadd -f import.ldif -xv -D "cn=drupal,ou=Apps,dc=org" -h localhost -W
cn = drupal,ou = Apps […]条目是cn = Manager,ou = Roles,dc = org的成员,因此它应具有足够的写入权限(since manage is the highest level of permissions available).
当我发出ldapadd命令时,导入在第一个ldif条目上失败.然后完整的命令输出:
add objectClass: top person inetOrgPerson add uid: John.Merrell add mail: john.merrell@example.org add cn: John D Merrell add structuralObjectClass: inetOrgPerson add entryUUID: 65236c42-09b7-1020-9318-9fca7c043dfc add creatorsName: cn=drupal,dc=bidnetwork,dc=org add createTimestamp: 20110503095643Z add userPassword: 2678u8yyy add givenName: John D add sn: Merrell add entryCSN: 20110629121956.880164Z#000000#000#000000 add modifiersName: cn=drupal,dc=org add modifyTimestamp: 20110629121956Z adding new entry "mail=john.merrell@example.org,ou=People,dc=org" ldap_add: Constraint violation (19) additional info: structuralObjectClass: no user modification allowed
我已经测试了在LDAP上存在或不存在的导入用户,并且在任何一种情况下都会出现上述错误.
有人可以解释问题的根源以及如何规避这个问题吗?