When creating an LDIF file using ldif-diff to compare 99-user.ldif files then using the output file to update schema using ldapmodify the following error occurs:
Processing MODIFY request for cn=schema MODIFY operation failed Result Code: 21 (Invalid Attribute Syntax)
Additional Information: An error occurred while attempting to decode the object class "( examplePerson-oid NAME 'examplePerson' DESC 'Example person' SUP top AUXILIARY MAY ( exampleAttr1 ) )": The definition for the objectclass with OID examplePerson-oid declared that it should include optional attribute "exampleAttr". No attribute type matching this name or OID exists in the server schema
When adding attributeTypes and objectClasses attributes, the attributeTypes must exist before adding the objectClasses that reference them. When deleting schema attributes this is reversed, the objectClasses attribute must be deleted before the attributeTypes that are referenced in the objectClasses attribute.
The server should only check for consistent “linkage” between attributes and objectclasses after making all the changes, before committing them.