Go to main content

Working With Oracle® Solaris 11.3 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: October 2017
 
 

Binding to a Specific NIS Server

Use the following steps to bind to an NIS server that you specify. For more information, see the ypinit(1M), ypstart(1M), and svcadm(1M) man pages.

  1. Add the host name of the NIS server and its IP address to the /etc/hosts file.

  2. Verify that the NIS domain name is set.

    # domainname
    example.com
  3. Prompt for the NIS server host name.

    # /usr/sbin/ypinit -c
    Server name: Type the NIS server host name
  4. Restart the NIS services by performing one of the following steps:

    • For the services to persist across reboots, run the svcadm command.

      # svcadm enable svc:/network/nis/client:default
    • For the services to persist until reboot only, run the ypstop and ypstart commands.

      # /usr/lib/netsvc/yp/ypstop
      # /usr/lib/netsvc/yp/ypstart