我是ldap和新手。我已经使用apached创建了嵌入式LDAP服务器。示例here。但是看到以下问题。我创建了错误的分区吗?看起来如何?对ldif文件有任何更改?

错误导入ldif文件时出现错误:

org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException:
OID samaccountname的ERR_04269 ATTRIBUTE_TYPE不存在!

Ldif文件:

dn: cn=Foo Bar,ou=people,o=foo,cn=ldaplookup,ou=dev,dc=foo,dc=bar
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user
cn: Foo Bar
sn: foo_bar
givenName: Foo
name: Foo Bar
displayName: Foo, Bar
sAMAccountName: foo_bar
userPrincipalName: [email protected]
mail: [email protected]

服务启动时出现其他错误:
11:19:12.622 [ATDD] [main] ERROR o.a.d.s.c.p.i.b.AbstractBTreePartition - ATDD - Cannot initialize the index for AttributeType userprincipalname, this value does not exist
11:19:12.622 [ATDD] [main] ERROR o.a.d.s.c.p.i.b.AbstractBTreePartition - ATDD - Cannot initialize the index for AttributeType user, this value does not exist
11:19:12.622 [ATDD] [main] ERROR o.a.d.s.c.p.i.b.AbstractBTreePartition - ATDD - Cannot initialize the index for AttributeType samaccountname, this value does not exist

最佳答案

检查架构,因为

objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: user

没有定义samaccountname,所以添加属性或纲要。我认为samba.schema

08-04 04:31