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

5. Sort the temporary passwd file by user name, as follows:
sort -o /etc/nis/passwd.temp -t: -k1,1 /etc/nis/passwd.temp
NOTE: NIS does not require that the passwd file be sorted on any of the fields. However,
sorting the passwd file makes it easier to find duplicate entries.
6. Examine the /etc/nis/passwd.temp file, and remove the duplicate entries for the same
user name.
NOTE: Ensure that each user in the network has a unique user name.
7. Sort the passwd.temp file by user ID, as follows:
sort -o /etc/nis/passwd.temp -t: -k3n,3 /etc/nis/passwd.temp
8. Examine the /etc/nis/passwd.temp file, and remove the duplicate entries of user IDs.
NOTE: Ensure that no two users in the network have the same user ID.
9. Move the sorted /etc/nis/passwd.temp file to the /etc/passwd file.
The /etc/passwd file is used to generate the passwd map for the NIS domain unless an
alternate password file is used as source.
10. Remove all the /etc/nis/passwd.hostname files from the master server. For example,
for a host ocelot, the password file /etc/nis/passwd.ocelot must be removed.
For more information about the passwd file, see passwd (4). For more information about the
sort command, see sort (1).
Creating the Master group File
To create the master group file, complete the following steps:
NOTE: Back up the /etc/group 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/group file from each host in the NIS domain as the
/etc/nis/group.hostname file 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 group file will be named as /etc/nis/group.ocelot.
4. Concatenate all the group files, including the master servers group file, into a temporary
group file, as follows:
cd /etc/nis
cat group group.hostname1 group.hostname2... > group.temp
5. Sort the temporary group file by group name, as follows:
sort -o /etc/nis/group.temp -t: -k1,1 /etc/nis/group.temp
22 Configuring and Administering an NIS Master Server