HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

10.6 Creating custom schema files
Schema files are simple LDIF files that define the cn=schema entry. Each attribute and object class
is added as an attribute to that entry. Here are the requirements for creating a schema file:
The first line must be dn: cn=schema.
The schema file can include both attributes and object classes; alternatively, it can include
only one or the other.
If both attributes and object classes are defined, all the attributes must be listed in the file first,
then the object classes.
The object classes can use attributes defined in other schema files.
The file must be named in the format [1-9][0-9]text.ldif.
The file must always begin with two numbers. Numerically, the schema file cannot be loaded
after the core configuration schema (which begin with 00 and 01).
Also, the Directory Server always writes its custom schema to the numerically and alphabetically
highest named schema file in the schema directory. It expects this file to be 99user.ldif.
If this file is not 99user.ldif, the server can experience problems. So, always make sure
custom schema files are at least alphabetically lower than 99user.ldif. The name
99alpha.ldif is okay; the name 99zzz.ldif is not.
Practices for creating schema files are described in more detail in the HP-UX Directory Server
deployment guide.
Attributes are defined in the schema file as attributetypes attributes to the schema, with five
components:
An OID, usually a dot-separated number
A unique name, in the form NAME name
A description, in the form DESC description
The OID for the syntax of the attribute values, listed in Table 49 (page 430), in the form SYNTAX
OID
Optionally, the source where the attribute is defined
For example:
attributetypes: ( 1.2.3.4.5.6.1 NAME 'dateofbirth' DESC 'For employee
birthdays' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUED X-ORIGIN
'Example defined')
Likewise, object classes are defined as objectclasses attributes, although there is slightly more
flexibility in how the object class is defined. The only required configurations are the name and
OID for the object class; all other configuration depends on the needs for the object class:
An OID, usually a dot-separated number
A unique name, in the form NAME name
A description, in the form DESC description
The superior, or parent, object class for this object class, in the form SUP object_class; if
there is no related parent, use SUP top
The word AUXILIARY, which gives the type of entry to which the object class applies;
AUXILIARY means it can apply to any entry
A list of required attributes, preceded by the word MUST; to include multiple attributes, enclose
the group in parentheses and separate with attributes with dollar signs ($)
A list of allowed attributes, preceded by the word MAY; to include multiple attributes, enclose
the group in parentheses and separate with attributes with dollar signs ($)
442 Managing the Directory Schema