Working With Oracle® Solaris 11.2 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: July 2014
 
 

NIS Commands

The NIS service is supported by several commands, which are described in the following table.

Table 5-2  NIS Command Summary
Command
Description
make
Updates NIS maps by reading /var/yp/Makefile (when the command is 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
Takes an input file and converts it into dbm.dir and dbm.pag files. NIS uses valid dbm files as maps. You can also use makedbm –u to disassemble a map so that you can see the key-value pairs that comprise it.
ypcat
Displays the contents of an NIS map.
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.
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.
yppoll
Shows which version of an NIS map is running on a server that you specify. It also lists the master server for the map.
yppush
Copies a new version of an NIS map from the NIS master server to its slaves. You run the yppush command on the master NIS server.
ypset
Instructs a ypbind process to bind to a named NIS server. This command 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.
ypwhich
Shows which NIS server a client is using at the moment for NIS services. If invoked with the –m mapname option, this command shows which NIS server is master of each map. If only –m is used, the command displays the names of all the available maps and their respective master servers.
ypxfr
Pulls an NIS map from a remote server to the local /var/yp/domain directory by 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.