HP-UX Directory Server 8.1 administrator guide

objectclass: cosSuperDefinition
objectclass: cosClassicDefinition
cosTemplateDn: cn=classicCoS,dc=example,dc=com
cosSpecifier: businessCategory
cosAttribute: postalCode override
3. Create the template entries for the sales and marketing departments. Add the CoS attributes
to the template entry. The cn of the template sets the value of the businessCategory
attribute in the target entry, then the attributes are added or overwritten according to the
value in the template:
dn: cn=sales,cn=classicCoS,dc=example,dc=com
objectclass: top
objectclass: extensibleObject
objectclass: cosTemplate
postalCode: 44438
dn: cn=marketing,cn=classicCoS,dc=example,dc=com
objectclass: top
objectclass: extensibleObject
objectclass: cosTemplate
postalCode: 99111
The classic CoS definition entry applies to all entries under the dc=example,dc=com suffix.
Depending upon the combination of the businessCategory attribute found in the entry and
the cosTemplateDN, it can arrive at one of two templates. One, the sales template, provides a
postal code specific to employees in the sales department. The marketing template provides a
postal code specific to employees in the marketing department.
5.2.3.6 Searching for CoS entries
CoS definition entries are operational entries and are not returned by default with regular searches.
This means that if a CoS is defined under ou=People,dc=example,dc=com, for example, the
following ldapsearch command will not return them:
ldapsearch -s sub -b ou=People,dc=example,dc=com (objectclass=*)
To return the CoS definition entries, add the ldapSubEntry object class to the CoS definition
entries. For example:
dn: cn=pointerCoS,ou=People,dc=example,dc=com
objectclass: top
objectclass: cosSuperDefinition
objectclass: cosPointerDefinition
objectclass: ldapSubEntry
cosTemplateDn: cn=exampleUS,ou=data,dc=example,dc=com
cosAttribute: postalCode override
Then use a special search filter, (objectclass=ldapSubEntry), with the search. This filter
can be added to any other search filter using OR (|):
ldapsearch -s sub -b ou=People,dc=example,dc=com
"(|(objectclass=*)(objectclass=ldapSubEntry))"
This search returns all regular entries in addition to CoS definition entries in the
ou=People,dc=example,dc=com subtree.
NOTE:
The Console automatically shows CoS entries.
5.2.4 Creating role-based attributes
Classic CoS schemes generate attribute values for an entry based on the role possessed by the
entry. For example, role-based attributes can be used to set the server look-through limit on an
entry-by-entry basis.
5.2 Assigning class of service 209