/usr/lib/netsvc/yp/ypbind [ -broadcast | -ypset | -ypsetme ]
NIS provides a simple network lookup service consisting of databases and processes. The databases are stored at the machine that runs an NIS server process. The programmatic interface to NIS is described in ypclnt.3n Administrative tools are described in ypinit.1m ypwhich.1 and ypset.1m Tools to see the contents of NIS maps are described in ypcat.1 and ypmatch.1
ypbind is a daemon process that is activated at system startup time from the startup script /etc/init.d/rpc. By default, it is invoked as ypbind -broadcast. ypbind runs on all client machines that are set up to use NIS, see sysidtool.1m
The function of ypbind is to remember information that lets all NIS client processes on a node communicate with some NIS server process. ypbind must run on every machine which has NIS client processes. The NIS server may or may not be running on the same node, but must be running somewhere on the network. The NIS server is not supported in SunOS releases anymore, but ypbind can communicate with an NIS server, ypserv, on an earlier SunOS release or an NIS+ server in "YP-compatibility mode", see rpc.nisd.1m Refer to the NOTES section in ypfiles.4 for implications of being served by such an NIS+ server.
The information ypbind remembers is called a binding -- the association of a domain name with a NIS server.
The process of binding is driven by client requests. As a request for an unbound domain comes in, if started with the -broadcast option, the ypbind process broadcasts on the net trying to find an NIS server, either a ypserv process serving the domain or an rpc.nisd process in "YP-compatibility mode" serving NIS+ directory with name the same as (case sensitive) the domain in the client request. Since the binding is established by broadcasting, there must be at least one NIS server on the net.
If started without the -broadcast option, ypbind process steps through the list of NIS servers that was created by ypinit -c for the requested domain. There must be an NIS server process on at least one of the hosts in the NIS servers file. All the hosts in the NIS servers file must be listed in /etc/hosts along with their IP addresses. Once a domain is bound by ypbind, that same binding is given to every client process on the node. The ypbind process on the local node or a remote node may be queried for the binding of a particular domain by using the ypwhich.1 command.
If ypbind is unable to speak to the NIS server process it is bound to, it marks the domain as unbound, tells the client process that the domain is unbound, and tries to bind the domain once again. Requests received for an unbound domain will wait until the requested domain is bound. In general, a bound domain is marked as unbound when the node running the NIS server crashes or gets overloaded. In such a case, ypbind will try to bind to another NIS server using the process described above.
ypbind also accepts requests to set its binding for a particular domain. The request is usually generated by the ypset.1m command. In order for ypset to work, ypbind must have been invoked with flags -ypset or -ypsetme.
ypbind supports multiple domains. The ypbind process can maintain bindings to several domains and their servers.
The -broadcast option works only on the UDP transport. It is insecure since it trusts "any" machine on the net that responds to the broadcast request and poses itself as an NIS server.
Created by unroff & hp-tools. © by Hans-Peter Bischof. All Rights Reserved (1997).
Last modified 21/April/97