ypserv(8) CLIX ypserv(8)
NAME
ypserv, ypbind - Runs Network Information Service (NIS) server and binder
daemons
SYNOPSIS
/etc/ypserv [-localonly]
/etc/ypbind [-ypset|-ypsetme]
FLAGS
-localonly Responds only to local requests. Requests from other systems
are ignored.
-ypset Allows root on any node to set the bindings.
-ypsetme Allows only the local root to set the bindings. If ypbind is
started with no options, no user will be allowed to set
bindings. Bindings will be set only dynamically and
transparently to the user.
DESCRIPTION
The Network Information Service (NIS) provides a simple network lookup
service consisting of databases and processes. The databases are ndbm
files in a directory tree rooted at /etc/yp. These files are described in
ypfiles(4). The processes are /etc/ypserv, the NIS database lookup
server, and /etc/ypbind, the NIS binder. The programmer interface to NIS
is described in ypclnt(3R). Administrative tools are described in
yppush(8), ypxfr(8), yppoll(8), ypwhich(8), and ypset(8). Tools to see
the contents of NIS maps are described in ypcat(8), and ypmatch(1).
Database generation and maintenance tools are described in ypinit(8),
ypmake(8), and makedbm(8).
Both ypserv and ypbind are daemon processes typically activated at system
startup time from /etc/nfs. The ypserv daemon runs only on NIS server
machines with a complete NIS database. This is typically most machines in
the CLIX environment. The ypbind daemon runs on all machines using NIS
services, both NIS servers and clients.
The primary function of the ypserv daemon is to look up information in its
local database of NIS maps. The operations performed by ypserv are
defined for the implementer by the NIS protocol specification and for the
programmer by the header file <rpcsvc/yp_prot.h>. Communication to and
from ypserv is by means of Remote Procedure Calls (RPCs). Lookup
functions are described in ypclnt(3R), and are supplied as C-callable
functions in /usr/lib/libbsd.a. Four lookup functions are performed on a
specified map within some NIS domain: Match, Get_first, Get_next, and
Get_all. These four functions are mnemonics describing the functionality
2/94 - Intergraph Corporation 1
ypserv(8) CLIX ypserv(8)
of certain remote procedures provided by ypserv. The callable functions
(such as yp_match(), and yp_first()) are described in ypclnt(3). The
Match operation accepts a key and returns the associated value. The
Get_first operation returns the first key-value pair from the map and
Get_next can be used to enumerate the remainder. Get_all sends the entire
map to the requester as the response to a single RPC request.
Two other functions supply information about the map rather than about map
entries: Get_order_number, and Get_master_name. In fact, both order
number and master name exist in the map as key-value pairs, but the server
does not return either through the normal lookup functions. (If the map
is examined with makedbm, however, they are visible.) Other functions are
used within the NIS subsystem, and are not of general interest to NIS
clients. They include Do_you_serve_this_domain?, Transfer_map, and
Reinitialize_internal_state.
The function of ypbind is to remember information that lets client
processes on a single node communicate with some ypserv process. The
ypbind daemon must run on every machine that has NIS client processes; the
ypserv daemon may or may not be running on the same node, but must be
running somewhere on the network.
The information ypbind remembers is called a - the association of a domain
name with the Internet address of the NIS server and the port on that host
where the ypserv process is listening for service requests. Binding is
driven by client requests. As a request for an unbound domain comes in,
the ypbind process broadcasts on the network trying to find a ypserv
process that serves maps within that domain. Since the binding is
established by broadcasting, at least one ypserv process must be on every
network. Once a domain is bound by a 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 domain by using the
ypwhich command.
Bindings are verified before they are given out to a client process. If
ypbind is unable to speak to the ypserv 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 fail immediately. In general, a bound domain is marked
unbound when the node running ypserv crashes or is overloaded. In such a
case, ypbind binds any NIS server available on the network (typically a
server less-heavily loaded).
The ypbind daemon also accepts requests to set its binding for a
particular domain. The request is usually generated by the NIS subsystem.
The ypset command accesses the Set_domain facility. The ypset command is
for fixing problems, not for normal use.
EXAMPLES
1. To start a server that responds to requests from NIS clients on the
2 Intergraph Corporation - 2/94
ypserv(8) CLIX ypserv(8)
local system or on other systems on the network, enter:
/etc/ypserv
2. To start a server that responds only to local NIS client requests,
enter:
/etc/ypserv -localonly
3. To start a ypbind server that allows local clients to access NIS
databases and allows root on any node to set bindings, enter:
/etc/ypbind -ypset
FILES
/etc/yp/ypserv.log If this file exists, log information is written to it
when error conditions arise.
DIAGNOSTICS
ypserv: Unable to register service for fast udp
The portmap process is not executing on this system, or it rejected
the register request.
ypbind: Unable to register tcp service
The portmap process is not executing on this system, or it rejected
the register request.
yp: Server not responding for domainname; still trying
The NIS server for this system is not responding to requests for
information.
yp: Server for domainname OK
The ypbind process has located a server for the local system NIS
domain.
EXIT VALUES
The ypserv command exits with a value of 0 if successful. If
unsuccessful, it exits with a value of 1.
RELATED INFORMATION
Commands: ypcat(1), ypmatch(1), yppush(8), ypwhich(8), ypxfr(8), ypset(8)
Functions: ypclnt(3)
2/94 - Intergraph Corporation 3
ypserv(8) CLIX ypserv(8)
Files: ypfiles(4)
CLIX Programming Guide
4 Intergraph Corporation - 2/94