Example 2–Implementing a Custom Map

This example shows how to implement a custom map.

A hypothetical map, servdate.bynumber, contains
information about the servicing dates for systems. This map is indexed by
the machine's serial number which, in this example, is 123. Each entry consists
of the machine owner's name, a colon, and a comma-separated list of service
dates, such as John Smith:1/3/2001,4/5/2003.

The old map structure is to be mapped onto LDAP entries of the following
form:

By examining the NISLDAPmapping file, you can see
that the mapping closest to the required pattern is group.
The custom mappings can be modeled on the group mapping.
Since there is only one map, no nisLDAPdatabaseIdMapping attribute
is required. The attributes to be added to NISLDAPmapping are
the following: