2013-10-25 38 views
3

我是ldap和apacheds的新手。我已經使用apacheds創建了嵌入式LDAP服務器。示例here。但看到以下問題。我是否創建了錯誤的分區?它會是什麼樣子?對ldif文件的任何更改?無法導入具有某些屬性的ldif文件

org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException: ERR_04269 ATTRIBUTE_TYPE爲OID SAM帳戶不存在導入LDIF文件時

錯誤我看到!

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 
+0

驗證LDAP客戶端所針對的LDAP目錄服務器是否具有架構中定義的必需屬性。 –

+0

如何在LDAP DS中定義屬性?我有我的服務器代碼,我認爲設置屬性。 addIndex(cmePartition,「objectClass」,「o」,「ou」,「uid」); – DaBears

+0

第1步:添加屬性類型第2步:添加屬性和值到現有的條目。屬性類型定義了屬性,屬性和參數,並且必須在向條目添加屬性之前完成。將步驟1視爲配置,將步驟2視爲配置。 –

回答

0

檢查的模式,因爲在

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

未定義samaccountname,因此添加該屬性或模式..我認爲samba.schema

+0

不知道不同的模式(例如:samba.schema)。將研究如何在我的服務器中進行配置。謝謝! – DaBears

+0

錯誤表示您沒有在某個對象類中定義此屬性 – FelasDroid