HP-UX Directory Server 8.1 deployment guide
3.4.8.2 Using 'user defined' as the origin
Do not use 'user defined' in the X-ORIGIN field of custom schema files (such as
60example.ldif), because 'user defined' is used internally by the Directory Server when
a schema is added over LDAP. In custom schema files, use something more descriptive, such as
'Example Corp. defined'.
However, if the custom schema elements are added directly to the 99user.ldif manually, use
'user defined' as the value of X-ORIGIN. If a different X-ORIGIN value is set, the server
simply may overwrite it.
Using an X-ORIGIN of value 'user defined' ensures that schema definitions in the
99user.ldif file are not removed from the file by the Directory Server. The Directory Server
does not remove them because it relies on an X-ORIGIN of value 'user defined' to tell it
what elements should reside in the 99user.ldif file.
For example:
attributetypes: ( exampleContact-oid NAME 'exampleContact' DESC
'Example Corporate contact'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
X-ORIGIN 'Example defined')
After the Directory Server loads the schema entry, it appears as follows:
attributetypes: ( exampleContact-oid NAME 'exampleContact'
DESC 'Example Corporate contact'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
X-ORIGIN ('Example defined' 'user defined') )
3.4.8.3 Defining attributes before object classes
When adding new schema elements, all attributes need to be defined before they can be used in
an object class. Attributes and object classes can be defined in the same schema file.
3.4.8.4 Defining schema in a single file
Each custom attribute or object class should be defined in only one schema file. This prevents
the server from overriding any previous definitions when it loads the most recently created
schema (as the server loads the schema in numerical order first, then alphabetical order). Decide
how to keep from having schema in duplicate files:
• Be careful with what schema elements are included in each schema file.
• Be careful in naming and updating the schema files. When schema elements are edited
through LDAP tools, the changes are automatically written to the last file (alphabetically).
Most schema changes, then, write to the default file 99user.ldif and not to the custom
schema file, such as 60example.ldif. Also, the schema elements in 99user.ldif override
duplicate elements in other schema files.
• Add all the schema definitions to the 99user.ldif file. This is useful if your are managing
the schema through the Directory Server Console.
3.5 Maintaining consistent schema
A consistent schema within Directory Server helps LDAP client applications locate directory
entries. Using an inconsistent schema makes it very difficult to efficiently locate information in
the directory tree.
Inconsistent schema use different attributes or formats to store the same information. Maintain
schema consistency in the following ways:
• Use schema checking to ensure attributes and object classes conform to the schema rules.
• Select and apply a consistent data format.
36 Designing the directory schema