Sun Directory Services 3.1 Administration Guide

Mapping File

The intention of the directory administrator is to create all employee entries under the naming context ou=People, o=XYZ, c=US. The token that specifies this in the mapping file is the BASE_DN token in the Common section.

The information will be imported just once. Therefore, it is not necessary to define an Export section in the mapping file. The Dynamic section is mandatory. The object class definition in the Condense section is also mandatory.

The mapping file created by the directory administrator is shown in Table 5-2.

Table 5-2 Example of Mapping File
# This example file for dsimport contains employee entries
# to be created as inetOrgPerson objects,in the LDAP directory.

Front-End: EXAMPLE

Table: People

	Common:
		BASE_DN=ou=People, o=XYZ, c=US

	Dynamic:
		LINE => $cn, $rest
		MATCH_FILTER=(&(objectClass=inetOrgPerson)(cn=$cn))
		ALL_FILTER=(&(objectClass=inetOrgPerson)(cn=*))

	Import:
		Extract:
			LINE => $fn $ln, $mail, $telephoneNumber, $description
		Condense:
			cn=$fn $ln
			snT=$ln
			objectClassT=string2instances("top person
organizationalPerson inetOrgPerson", " ")
		Build:
			dn=cn=$cn, $BASE_DN
			sn=$snT
			mail=$mail
			telephoneNumber=$telephoneNumber
			description=$description
			objectClass=$objectClassT

The Condense section contains the inheritance tree for the inetOrgPerson object class.

The Build section contains all the mandatory attributes pertaining to or inherited by the inetOrgPerson object class. It also contains the optional attributes pertaining to this object class that the directory administrator required.