Solaris Naming Administration Guide

Adding a New Slave Server

After NIS is running, you may need to create a new NIS slave server that you did not include in the initial list given to ypinit.

To add a new NIS server:

  1. Log in to the master server as root.

  2. Change to the NIS domain directory by typing:

    # cd /var/yp/domainname
  3. Disassemble the ypservers file, as follows:

    # makedbm -u ypservers >/tmp/temp_file

    The makedbm command converts ypservers from ndbm format to a temporary ASCII file /tmp/temp_file.

  4. Edit the /tmp/temp_file file using a text editor. Add the name of the new slave server to the list of servers. Then save and close the file.

  5. Run the makedbm command with temp_file as the input file and ypservers as the output file:

    # makedbm /tmp/temp_file ypservers

    makedbm then converts ypservers back into ndbm format.

  6. Verify that the ypservers map is correct (since there is no ASCII file for ypservers) by typing:

    slave3# makedbm -u ypservers

    The makedbm command displays each entry in ypservers on your screen.

    Note -

    If a machine name is not in ypservers, it will not receive updates to the map files because yppush consults this map for the list of slave servers.

  7. Set up the new slave server's NIS domain directory by copying the NIS map set from the master server.

    To do this, log in to the new NIS slave as superuser and run the ypinit and ypbind commands:

    slave3# cd /var/yp
    slave3# ypinit -c list of servers
    slave3# /usr/lib/netsvc/yp/ypbind
  8. To initialize this machine as a slave, type the following:

    # /usr/sbin/ypinit -s ypmaster

    Where ypmaster is the machine name of the existing NIS master server.

  9. Run ypstop to stop the machine running as a NIS client.

  10. Run ypstart to start NIS slave service.


    See the Solaris Naming Setup and Configuration Guide for a more detailed description of setting up NIS slave servers.