You should consider the following points when extending the schema:
  • Never modify the default schema files as doing so could damage the Directory Server’s processing capabilities.
  • Define all attributes first before they can be used in an object class. If you are using the Schema Editor to add new schema elements, then you can use the Quick Add Attributes option when defining new objectclasses.
  • Define the parent object class first before creating object classes that inherit from the parent.
  • The schema file naming syntax requires that custom schema files must begin with exactly two digits followed by a non-digit character, followed by a zero or more characters and ending with ".ldif". Note that the two digits do not need to be followed by a dash ("-"). Any files that do not meet this criteria will be ignored and either a NOTICE or SEVERE_WARNING message will be logged.

    Any file in the <server-root>/config/schema directory with a name that starts with "." or with a name that ends with a tilde (’~’), ".swp", or ".tmp" will generate a NOTICE message indicating that temporary files will be ignored. Any other file that does not meet the naming criteria will generate a SEVERE_WARNING message indicating that it will be ignored.

  • Define custom attributes and object classes in one file. Typically, this file will be the 99-user.ldif. You can specify a different file name to which the Directory Server writes using the X-SCHEMA-FILE element and the file name in the definition. For example:
    add: attributeTypes attributeTypes: (
      NAME 'contractorStatus' 
      EQUALITY booleanMatch 
      USAGE userApplications 
      X-ORIGIN 'Directory Server Example' 
      X-SCHEMA-FILE '99-custom.ldif' )
  • Pay special attention to the white space characters in the schema definitions, where WSP means zero or more space characters, and SP means one or more space characters. The LDIF specification states that LDIF parsers should ignore exactly one space at the beginning of each continuation line, since continuation lines must begin with a space character. Thus, if you define a new schema definition with each keyword on a separate continuation line, you should add two spaces before an element keyword to be safe. For example, the following attribute definition has two spaces before the keywords: NAME, SUP, and X-ORIGIN.
    attributeTypes: ( NAME 'owner' SUP distinguishedName X-ORIGIN 'RFC 4519' )
  • In a replicated topology, any new schema additions will be replicated to other replication servers to their respective Schema backend. The additions will be written to the file specified by the X-SCHEMA-FILE extension or written to 99-user.ldif if no file is specified.