When you first initialize the NIS service using dsypinstall, you are prompted to provide values for all the NIS configurations parameters. You can change this configuration at any time after the initial configuration by editing the nis.mapping file.
For your changes to be taken into account, after modifying the appropriate parameters, you must run the dsypinit script. On a master server, run the following command:
# dsypinit -m
On a slave server, run the following command:
# dsypinit -s <master>
where master specifies the name of the master server which will replicate data to the slave.
These commands will modify the LDAP directory database to take into account the configuration changes you made in the nis.mapping file.
Setting NIS Configuration Variables
All configuration information is stored in the first part of the nis.mapping file under a section entitled Configuration Variables.
DOMAIN_NAME
Specifies the NIS domain managed by the server.
NAMING_CONTEXT
When this variable is defined, it specifies the directory tree suffix (or naming context) under which the NIS subtree is created.
If this variable is not defined, the directory tree suffix is derived from the domain name supplied when running the dsypinstall script as described in "Running the dsypinstall Script" . By default, the directory tree suffix is generated with dc (domain component) attributes. For example, with DOMAIN_NAME=france.airius.com, the directory tree suffix created by default is dc=france,dc=airius,dc=com.
The NIS subtree shown in "NIS Files/LDAP Subtrees" is created under this subtree.
ADMIN_SUFFIX
The distinguished name of the subtree that will hold NIS administrative entries. These entries are maintained automatically by the server.
DBM_DIRECTORY
Specifies the directory where the NIS binary maps are generated.
AUTOMATIC_PUSH
When NIS entries are modified in the LDAP directory, specifies to automatically push modifications to slave NIS servers. This variable is used only in the context of standard NIS replication (using yppush), not in the context of LDAP replication.
The possible values for this variable are enabled or disabled. The default setting is disabled.
AUTOMATIC_PUSH_DELAY
Specifies the delay for pushing modifications to slaves in minutes. When this variable is defined, the AUTOMATIC_PUSH variable must be enabled.
Configuring NIS Subtrees
The subtrees created for NIS entries during the initialization of the NIS service are specified in the nis.mapping file by the keyword BASE_DN. This base DN is the concatenation of an organizational unit (ou) specific to each map, and of a rootTree token that is usually common to several maps.
For example, the subtree for the entries created from the /etc/networks file is defined by the following two lines in the nis.mapping file:
rootTreeT=ou=Services,$NAMING_CONTEXT||ou=Services,$DC_NAMING
BASE_DN=ou=Networks,$rootTreeT
The directory entries created from the /etc/networks file are created under the ou=Networks, ou=Services subtree.
The choice of a naming structure through the NAMING_CONTEXT keyword or DC_NAMING keyword is a configuration decision.
The DC_NAMING keyword contains a domain component (dc) suffix. The DNs of entries created with that naming structure have a suffix of the form dc=sun, dc=com. This is the default choice when you initialize the NIS service, because the import process derives a dc naming suffix from the domain name you supply when you run dsypinstall.
If you prefer to use a different naming structure, you must un-comment the NAMING_CONTEXT keyword at the beginning of the nis.mapping file, under the Common section for the front-end. Change the value of the NAMING_CONTEXT keyword to specify the suffix under which you want NIS entries to be created. The value you specify must be a valid suffix or subtree in the directory tree held on the directory server.
After changing the suffix, you must run the dsypinit script. For information, refer to "dsypinit" .
Note.
Do not comment out the DOMAIN_NAME keyword in the nis.mapping file. This keyword contains the domain name that you supplied during the dsypinstall process.