NIS-Related Commands

The NIS service includes specialized daemons, system programs, and commands,
which are summarized in the following table.

Table 4–4 NIS Command Summary

Command

Description

ypserv

Services NIS clients' requests for information from an NIS map. ypserv is a daemon that runs on NIS servers with a complete set of maps.
At least one ypserv daemon must be present on the network
for NIS service to function.

ypbind

Provides NIS server binding information to clients. It provides binding
by finding a ypserv process that serves maps within the
domain of the requesting client. ypbind must run on all
servers and clients.

ypinit

Automatically creates maps for an NIS server from the input files. It
is also used to construct the initial /var/yp/binding/domain/ypservers file on the clients. Use ypinit to set up the master NIS server and the slave NIS servers
for the first time.

make

Updates NIS maps by reading the Makefile (when
run in the /var/yp directory). You can use make to
update all maps based on the input files or to update individual maps. The ypmake(1M) man page
describes the functionality of make for NIS.

makedbm

makedbm takes an input file and converts it into dbm.dir and dbm.pag files – valid dbm files that NIS can use as maps. You can also use makedbm-u to disassemble a map, so that you can see the key-value pairs that
comprise it.

ypxfr

Pulls an NIS map from a remote server to the local /var/yp/domain directory, using NIS itself as the transport medium.
You can run ypxfr interactively, or periodically from a crontab file. It is also called by ypserv to
initiate a transfer.

ypxfrd

Provides map transfers service for ypxfr requests
(generally slave servers). It is run only on the master server.

yppush

Copies a new version of an NIS map from the NIS master server to its
slaves. You run it on the master NIS server.

ypset

Tells a ypbind process to bind to a named NIS server.
This is not for casual use and its use is discouraged because of security
implications. See the ypset(1M) and ypbind(1M) man pages
for information about the ypset and ypsetme options to the ypbind process.

yppoll

Tells which version of an NIS map is running on a server that you specify.
It also lists the master server for the map.

ypcat

Displays the contents of an NIS map.

ypmatch

Prints the value for one or more specified keys in an NIS map. You cannot
specify which version of the NIS server map you are seeing.

ypwhich

Shows which NIS server a client is using at the moment for NIS services,
or, if invoked with the -mmapname option,
which NIS server is master of each of the maps. If only -m is
used, it displays the names of all the maps available and their respective
master servers.