Guillaume Pansier
Guillaume Pansier

Reputation: 201

Schema addition in slapd.d : unknown directive <objectClass:>

I am trying to set up an openLDAP LDAP on Ubuntu 14.04, and I would like to add a custom schema to the dynamic ldap conf. As I understood, I have to add dynamically a ldif entry to my ldap, under the DN: cn=myCustomSchema,cn=schema,cn=config.

What I wanted to do was:

  1. creation of a schema file
  2. creation of a .conf file linking to my schema file
  3. conversion of the schema to a ldif file, thanks to a slaptest or slapcat command and the .conf file
  4. addition of the .ldif to the LDAP

I can't go through point 3., since both slaptest and slapcat command return: line xxx: unknown directive outside backend info and database definitions. I've read a thousand time my schema file, but I can't find my error. I also couldn't find anything usefull about such an error.

Here is a part of my schema file:

attributeTypes: (1.2.840.113556.1.8000.2554.48931.2232.50796
    NAME 'altitudeEntity'
    EQUALITY caseIgnoreMatch
    ORDERING caseIgnoreOrderingMatch
    SUBSTR caseIgnoreSubstringsMatch
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
    SINGLE-VALUE USAGE userApplications )

attributeTypes: ( 1.2.840.113556.1.8000.17728.40464.13370.25661.2712
    NAME 'descriptionEntity'
    EQUALITY caseIgnoreMatch
    ORDERING caseIgnoreOrderingMatch
    SUBSTR caseIgnoreSubstringsMatch
    SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
    SINGLE-VALUE
    USAGE userApplications )
.
. other attributes
.
 ObjectClass: ( 1.2.840.113556.45669.16975.37105.36062
     NAME 'principalClass'
     SUP top STRUCTURAL
     MUST RDNFragment
     MAY ( altitudeEntity $ descriptionEntity $ ...) )
.
. other classes extending principalClass (SUP principalClass)
.

Also: when keeping only attributes, the commands succeed and the ldif files are generated. The error is always on the first objectClass.

Thanks for any help :)

Upvotes: 3

Views: 2603

Answers (1)

Guillaume Pansier
Guillaume Pansier

Reputation: 201

Found the error this morning, I guess I was tired yesterday.

The correct syntax is objectclass ( OID ... without " : ". I changed also attributeTypes: ( OID... to attributetype ( OID... and everything worked fine.

Upvotes: 4

Related Questions