NFS Services Administrator's Guide
Configuring and Administering NIS
Configuring and Administering an NIS Master Server
Chapter 4156
To Create the Master group File
1. Copy the /etc/group file from each host in your NIS domain to the
/etc directory on the host that will be the master server. Name each
copy /etc/group.hostname, where hostname is the name of the host
it came from.
2. Concatenate all the group files together, including the master
server’s group file, into a temporary group file, as follows:
cd /etc
cat group group.hostname1 group.hostname2... > group.temp
3. Issue the following command to sort the temporary group file by
group name:
sort -o /etc/group.temp -t: -k1,1 /etc/group.temp
4. Examine /etc/group.temp for duplicate group names. If a group
name appears more than once, merge the groups with the same
name into one group and remove the duplicate entries.
5. Issue the following command to sort the temporary group file by
group ID:
sort -o /etc/group.temp -t: -k3n,3 /etc/group.temp
6. Examine /etc/group.temp for duplicate group IDs. If you find
multiple entries with the same group ID, edit the file to change the
group IDs so that no two groups have the same group ID.
7. Move /etc/group.temp (the sorted, edited file) to /etc/group. This
file will be used to generate the group map for your NIS domain.
8. Remove the /etc/group.hostname files from the master server.
NOTE NIS does not require that the group file be sorted in any particular way.
Sorting the group file simply makes it easier to find duplicate entries.
For more information, type man 4 group or man 1 sort at the HP-UX
prompt.