title: Schema addition in slapd.d : unknown directive <objectClass:>
body: <p>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.</p>
  
  <p>What I wanted to do was:</p>
  
  <ol>
  <li>creation of a schema file</li>
  <li>creation of a .conf file linking to my schema file</li>
  <li>conversion of the schema to a ldif file, thanks to a slaptest or slapcat command and the .conf file</li>
  <li>addition of the .ldif to the LDAP</li>
  </ol>
  
  <p>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.</p>
  
  <p>Here is a part of my schema file:</p>
  
  <pre><code>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)
  .
  </code></pre>
  
  <p>Also: when keeping only attributes, the commands succeed and the ldif files are generated. The error is always on the first objectClass.</p>
  
  <p>Thanks for any help :) </p>