Adding a New NIS Worker Server

If your network configuration grows or changes, you may want to add additional worker servers to support the new configuration. Adding a new worker server involves modifying the ypservers map. The procedure for modifying the ypservers map differs from other maps because no text file is used as input for this map. Instead, the makedbm utility is used to create the modified ypservers maps.

Note: NIS worker servers are conventionally known as NIS slave servers. These terms are used interchangeably to use more inclusive language.

To add a new worker server to your network, do the following on the master server:

  1. Change to the /var/yp directory by entering:
    cd /var/yp
    Note: If the file /var/yp/securenets exists, the server only provides NIS services to hosts within the IP range specified.
  2. Enter the command:
    (makedbm -u domain/ypservers ; echo new_server new_server) | 
    makedbm - tmpservers

    where domain specifies the name of this NIS domain, and new_server specifies the name of the worker server host that you are adding to the ypservers map. This command lists the contents of the current ypservers map, and appends the name of the new worker server, and then creates a new map called tmpservers.

  3. Verify that the new map contains the names of all the worker servers by entering the command:
    makedbm -u tmpservers
  4. Replace the old ypservers map files with the new ones by entering the following two commands:
    mv tmpservers.pag domain/ypservers.pag
    mv tmpservers.dir domain/ypservers.dir
    where domain specifies the name of this NIS domain.
  5. Follow the instructions in Configuring an NIS Worker Server.
  6. If you are using the ypservers file to avoid broadcasts, you may want to add the new server to the file on the clients. See Avoiding Broadcasts.