Pages

Tuesday, December 28, 2010

How to configure NIS client

You can use tips below to configure host as NIS client. In this example you already have NIS master server and NIS slave server. You only can have 1 NIS master server, but can have several NIS slave server.
  1. Modify your /etc/inet/hosts file to include IP address – hostname of NIS master server and NIS slave servers.
  2. Set NIS domain on your host.
    # vi /etc/defaultdomain
    sun.com
    # domainname sun.com
  1. Initialize your system as NIS client. When system prompts for list of NIS servers, enter the name of NIS master server and all NIS slave servers.
    # ypinit -c
  2. Modify your /etc/nsswitch.conf to contain NIS. For instance, copy from /etc/nsswitch.nis file
    # cp /etc/nsswitch.nis /etc/nsswitch.conf
  3. Start your NIS client service
    # svcadm enable svc:/network/nis/client:default
  4. Test your NIS client functionality. List NIS maps and NIS server for each map.
    # ypwhich -m

No comments:

Post a Comment