ypserv.1m (2010 09)
y
ypserv(1M) ypserv(1M)
NAME
ypserv, ypbind, ypxfrd - Network Information Service (NIS) server, binder, and transfer processes
SYNOPSIS
/usr/lib/netsvc/yp/ypserv
[-l log_file ][-dv]
/usr/lib/netsvc/yp/ypbind
[-l log_file ][-s][-ypset-ypsetme]
[
-broadcast]
/usr/sbin/ypxfrd
Remarks
The Network Information Service (NIS) was formerly known as Yellow Pages (YP). The functionality
remains the same; only the name has changed.
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
/var/yp (see ndbm(3X)).
These files are described in ypfiles (4). The processes are
/usr/lib/netsvc/yp/ypserv
, which is
the NIS database lookup server, and
/usr/lib/netsvc/yp/ypbind
, which is the NIS binder. Both
ypserv and ypbind are daemon processes activated at system startup time when the
NIS_MASTER_SERVER
or NIS_SLAVE_SERVER variable is set to 1, for ypserv, and the
NIS_CLIENT variable is set to 1, for ypbind, in the /etc/rc.config.d/namesvrs
file.
The NIS programmatic interface is described in ypclnt (3C). Administrative tools are described in
ypwhich (1), yppoll (1M), yppush (1M), ypset (1M) and ypxfr (1M). Tools to see the contents of NIS maps
(databases) are described in ypcat (1) and ypmatch (1). Database generation and maintenance tools are
described in makedbm(1M), ypinit (1M), and ypmake (1M). The command to set or show the default NIS
domain is
domainname which is described in domainname(1).
The
ypxfrd daemon transfers entire NIS maps in an efficient manner. For systems that use this dae-
mon, map transfers will be faster, depending on the map. ypxfrd should be run on the master server.
ypxfr (see ypxfr (1M)) will attempt to use ypxfrd first. If that fails, it will use the older transfer
method. The ypxfrd daemon is activated at system startup time when the NIS_MASTER_SERVER
or
NIS_SLAVE_SERVER
variable is set to 1 in the /etc/rc.config.d/namesvrs file.
The
ypserv daemon’s primary function is to look up information in its local database of NIS maps. It
runs only on NIS server machines providing data from NIS databases.
The operations performed by
ypserv are defined for the implementor by the YP Protocol Specification,
and for the programmer by the header file <rpcsvc/yp_prot.h>
. Communication to and from
ypserv is by means of RPC. Lookup functions are described in ypclnt (3C) and are supplied as C-
callable functions in the TI-RPC library (-lnsl).
These four functions:
yp_match(), yp_first(), yp_next(), and yp_all(), perform a lookup on
a specific map within a NIS domain. The yp_match() operation matches a key to a record in the data-
base and returns its associated value. The yp_first() operation returns the first key-value pair
(record) from the map, and yp_next() can be used to enumerate (sequentially retrieve) the remainder
of the records. yp_all() returns all records in the map to the requester as the response to a single RPC
request.
A number of special keys in the DBM files can alter the way in which
ypserv operates. The keys of
interest are:
YP_INTERDOMAIN
The presence of this key makes ypserv forward host lookups that cannot be satisfied by the
DBM files to a DNS server.
YP_SECURE
This key makes ypserv answer only questions coming from clients on reserved ports.
YP_MULTI_hostname
This is a special key in the form "YP_MULTI_hostname addr1, ..., addrN".
A client looking for hostname receives the closest address.
Two functions supply information about the map itself and not the map entries. These functions are
yp_order() and yp_master(). The order number is the time of last modification of a map. The
master name is the host name of the machine on which the master map is stored. Both order number and
master name exist in the map as special key-value pairs, but the server does not return these through the
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1