5
votes

I am new to ldap and apacheds. I have created embedded LDAP server using apacheds. Example here. But seeing the following issue. Am I creating a wrong partition? How would it look like? Any changes to ldif file?

ERROR I am seeing when importing ldif file:

org.apache.directory.api.ldap.model.exception.LdapNoSuchAttributeException: ERR_04269 ATTRIBUTE_TYPE for OID samaccountname does not exist!

Ldif file:

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]

Additional ERROR when service starts up:

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
Verify that the LDAP Directory Server targeted by the LDAP client has the required attributes defined in the schema.Terry Gardner
How can I defined attributes in LDAP DS? I have following in my server code which I think sets the attribute. addIndex(cmePartition, "objectClass", "o", "ou", "uid");DaBears
Step 1: add attribute type Step 2: add attribute and value to existing entry. The attribute type defines the attribute, its characteristics and parameters, and must be accomplished before adding an attribute to an entry. Think of step 1 as configuration and step 2 as provisioning.Terry Gardner

1 Answers

0
votes

check the schema, because in

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

is not define the samaccountname, so add the attribute, or schema..i thinks samba.schema