The two methods for configuring a machine to use NIS as its name service are explained below.
ypinit. The recommended method for configuring a client machine to use NIS is to login to the machine as root and run ypinit -c.
# ypinit -c |
You will be asked to name NIS servers from which the client may obtain name service information. You may list as many master or slave servers as you want. The servers that you list can be located anywhere in the domain. It is a good practice to first list the servers closest (in net terms) to the machine, then those that are on more distant parts of the net.
Broadcast method. An older method of configuring a client machine to use NIS is to log in to the machine as root, set the domain name with the domainname command, then run ypbind.
# domainname doc.com # ypbind -broadcast |
When you run ypbind, it searches the local subnet for an NIS server. If it finds one, it binds to it. This search is referred to as broadcasting. If there is no NIS server on the client's local subnet, it will fail to bind and the client machine will not be able to obtain namespace data from the NIS service.