slapd/ldap_add error messages ----------------------------- ldap_add: Invalid syntax (21) additional info: objectClass: value #0 invalid per syntax The object you are trying to create names an objectClass that is not in your configured schemas. There is probably a schema file missing from /etc/ldap/slapd.d/cn=config/cn=schema ldap_add: Object class violation (65) additional info: no structural object class provided You are trying to define an object whose objectclasses are all either AUXILIARY or ABSTRACT. You must include at least one STRUCTURAL object class. Converting old-style schemas to the new style --------------------------------------------- If /etc/ldap/slapd.d exists on your system, you are using new-style configuration files. Unfortuantely, most of the schema files you will see are in an older style and will need converting before they can be used. 0. Before you start, ensure that the schema file is in a format that is acceptable to slaptest: its parser is rather flaky. 0.1 Keywords such as attributetype, objectidentifier, objectclass must begin in column 1. 0.2 The body of each definition must be indented. 1. Create empty work directories e.g. mkdir -p /var/tmp/foo/bar 2. cp myOldStyleSchema.schema /var/tmp/foo 3. cd /var/tmp/foo cat >> slapd.conf <<%%EOF%% include myOldStyleSchema.schema %%EOF 4. slaptest -f ./slapd.conf -F ./bar 5. cp './bar/cn=config/cn=schema/{0}myOldStyleSchema.ldif '/etc/ldap/cn=config/cn=schema' 6. cd '/etc/ldap/cn=config/cn=schema' Rename the file you have just copied in by changing the {0} to something that ensures that it will be loaded after all the core schemas. Ensure that the file is owned by openldap:openldap. 7. (Re-)start slapd. Note: it is possible to run slaptest directly on your schema, but then it will convert it in a way that is Not Quite Right (tm).