1

I have the following ldif file which I am trying to load into openLDAP:

Custom schema being created for the Monas project

dn: cn=testSchemas,cn=schema,cn=config
objectClass: olcSchemaConfig
cn: testSchemas
olcAttributeTypes ( 1.3.6.1.4.1.4203.666.1.90 
 NAME 'competence'
 DESC 'The field an individual is qualified'
 EQUALITY caseIgnoreMatch
 SUBSTR caseIgnoreSubStringsMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{128} )

olcAttributeTypes ( 1.3.6.1.4.1.4203.666.1.91 
 NAME 'spokenLanguage'
 DESC 'The language spoken by a person.'
 SUP preferredLanguage
 EQUALITY caseIgnoreMatch
 SUBSTR caseIgnoreSubStringsMatch
 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{256} )

olcObjectClasses ( 1.3.6.1.4.1.4203.666.2012.1 
 NAME 'inetOrgTestPerson'
 DESC 'An extension of the inetOrgPerson objectClass to add some additional attributes'
 SUP inetOrgPerson
 STRUCTURAL
 MUST competence
 MAY spokenLanguage )

I keep geting the error: ldapadd: invalid format (line 4) entry: cn=testSchemas,cn=schema,cn=config" and I can't figure out for the life of me what's wrong. I am on ubuntu 12.04 with openldap 2.4.28

Edit: After fixing the syntatic error of the missing ':', I managed to add the object and attributes (or so I thought) but I can't see them when I execute a search I get the error:

ldap_modify: Type or value exists (20)
    additional info: modify/add: olcAttributeTypes: value #0 already exists

when I try to add the objects again which means they're in the db, but nothing turns up in search.

3
  • The error is talking about modify/add, not a search. Post the full command.
    – quanta
    Aug 27, 2012 at 2:25
  • Command is: sudo ldapadd -H ldap://localhost -D "cn=admin,cn=config" -x -w r0llc4g3 -f ~/inetorglawperson.ldif. Perhaps I should post the current problem separately?
    – Dark Star1
    Aug 27, 2012 at 8:16
  • I think so, too. Insert link here when you done.
    – quanta
    Aug 27, 2012 at 8:21

1 Answer 1

1

From what I can see in your LDIF you are missing the colon (:) after the olcAttributeTypes and olcObjectClasses keywords. Should look like this:

olcAttributeTypes: ( 1.3.6.1.4.1.4203.666.1.90
  NAME 'competence'
  ...
1
  • Thanks I discovered this error before you posted but I have another problem and have edited the post to explain
    – Dark Star1
    Aug 27, 2012 at 1:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .