System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)

ProcedureHow to Set Up a Slave Server

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Edit the /etc/hosts or /etc/inet/ipnodes file on the slave server to add the name and IP addresses of all the other NIS servers.

  3. Change directory to /var/yp on the slave server.


    Note –

    You must first configure the new slave server as an NIS client so that it can get the NIS maps from the master for the first time. See Setting Up NIS Clients for details.


  4. Initialize the slave server as a client.


    # /usr/sbin/ypinit -c
    

    The ypinit command prompts you for a list of NIS servers. Enter the name of the local slave you are working on first, then the master server, followed by the other NIS slave servers in your domain in order from the physically closest to the furthest in network terms.

  5. Determine if the NIS client is running, then start the client service as needed.


    # svcs network/nis/client
    STATE          STIME     FMRI
    online         20:32:56  svc:/network/nis/client:default

    If svc:/network/nis/client is displayed with an online state, then NIS is running. If the service state is disabled, then NIS is not running.

    1. If the NIS client is running, restart the client service.


      # svcadm restart network/nis/client
      
    2. If the NIS client is not running, start the client service.


      # svcadm enable network/nis/client
      
  6. Initialize this machine as a slave.


    # /usr/sbin/ypinit -s master
    

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

    Repeat the procedures described in this section for each machine you want configured as an NIS slave server.