无法导入带有某些属性的ldif文件

时间:2013-10-25 16:41:32

标签: java ldap openldap directoryservices apacheds

我是ldap和apacheds的新手。我使用apacheds创建了嵌入式LDAP服务器。示例here。但看到以下问题。我创建了一个错误的分区吗?它看起来怎么样?对ldif文件的任何更改?

我在导入ldif文件时看到的错误:

  

org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException:   ERR_04269 OID samaccountname的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: foo_bar@foo.chicago.com
mail: mail_foo@foo.com

服务启动时的其他错误:

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

1 个答案:

答案 0 :(得分:0)

检查架构,因为在

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

没有定义samaccountname,所以添加属性或schema..i认为samba.schema