Network Information Service (NIS) B.11.31.04 Administrator's Guide
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:
# 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 each group has a unique 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
The /etc/hosts file associates the IP address of a system with the host name and
aliases. This enables users to refer to a host by its symbolic name instead of IP address.
To create the master /etc/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 a superuser.
2. If you have already created the /etc/nis directory in the previous section, skip
this step.
Create a new directory:
# 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 host file will be named as /etc/nis/
hosts.ocelot.
4. Concatenate all the hosts files, including the NIS master server’s hosts file, into
a temporary hosts file:
# cd /etc/nis/
28 Configuring and Administering an NIS Master Server