Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ( 
 NAME 'competence'
 DESC 'The field an individual is qualified'
 EQUALITY caseIgnoreMatch
 SUBSTR caseIgnoreSubStringsMatch
 SYNTAX{128} )

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

olcObjectClasses ( 
 NAME 'inetOrgTestPerson'
 DESC 'An extension of the inetOrgPerson objectClass to add some additional attributes'
 SUP inetOrgPerson
 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.

share|improve this question
The error is talking about modify/add, not a search. Post the full command. – quanta Aug 27 '12 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 '12 at 8:16
I think so, too. Insert link here when you done. – quanta Aug 27 '12 at 8:21
up vote 1 down vote accepted

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

olcAttributeTypes: (
  NAME 'competence'
share|improve this answer
Thanks I discovered this error before you posted but I have another problem and have edited the post to explain – Dark Star1 Aug 27 '12 at 1:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.