Network Information Service (NIS) B.11.31.02 Administrator's Guide

NOTE: NIS does not require that the group file be sorted in any of the fields. However,
sorting the group file makes it easier to find duplicate entries.
6. Examine the /etc/nis/group.temp file for duplicate group name entries.
7. Merge the groups with the same name into one group to remove the duplicate entries.
8. Sort the temporary group file by group ID, as follows:
sort -o /etc/nis/group.temp -t: -k3n,3 /etc/nis/group.temp
9. Examine the /etc/nis/group.temp file for duplicate group IDs.
NOTE: Ensure that no two groups have the same group ID.
10. Move the sorted /etc/nis/group.temp file to the /etc/group file.
The /etc/group file is used to generate the group map for the NIS domain.
11. Remove the /etc/nis/group.hostname files from the master server. For example, for
a host ocelot, the group file /etc/nis/group.ocelot must be removed.
For more information about the group file, see group (4). For more information about the sort
command, see sort (1).
Creating the Master hosts File
To create the master hosts file, complete the following steps:
NOTE: Back up the /etc/hosts file before you perform the steps described in this section.
1. Log in to the NIS master server as superuser.
2. If you have already created /etc/nis directory in the previous section skip this step.
Create a new directory, as follows.
cd /etc
mkdir nis
3. Copy the /etc/hosts file from each host in your NIS domain as
/etc/nis/hosts.hostname to the NIS master server.
Where:
hostname specifies the name of the host to which the file belongs. For example, for a host
ocelot, the hosts file will be named as /etc/nis/hosts.ocelot.
4. Concatenate all the hosts files, including the master servers hosts file, into a temporary
hosts file, as follows:
cd /etc/nis/
cat hosts hosts.hostname1 hosts.hostname2... > hosts.temp
5. Sort the temporary hosts file by IP address, as follows:
sort -o /etc/nis/hosts.temp -b -k1,1 /etc/nis/hosts.temp
NOTE: NIS does not require that the hosts file be sorted in any particular way. However,
sorting the hosts file makes it easier to find the duplicate entries.
6. Examine the /etc/nis/hosts.temp file for duplicate IP addresses, and remove the
duplicate entries.
Creating the Master hosts File 23