Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > Y


HP-UX 11i Version 3: February 2007

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index


ypmake — create or rebuild Network Information Service databases


/var/yp/ypmake [DIR= source_directory] [DOM= NIS_domain] [NOPUSH=1] [PWFILE= passwd_file] [SWFILE= shadow_file] [map [map ...]]

cd /var/yp; make [DIR= source_directory] [DOM= NIS_domain] [NOPUSH=1] [PWFILE= passwd_file] [SWFILE= shadow_file] [map ...]


The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same.


ypmake is a shell script that builds one or more Network Information Service (NIS) maps (databases) on a master NIS server. If no arguments are specified, ypmake either creates maps if they do not already exist or rebuilds maps that are not current. These maps are constructed from ASCII files. ypmake then executes yppush to notify slave NIS servers of the change and make the slave servers copy the updated maps to their machines (see yppush(1M)).

If any maps are supplied on the command line, ypmake creates or updates those maps only. Permissible names for maps are the filenames in /etc listed under FILES below. In addition, specific maps can be named, such as netgroup.byuser or rpc.bynumber.

The make command can be used instead of ypmake (see make(1)). The Makefile no longer calls the ypmake script but now actually constructs the maps. All NIS commands have been modified to use the Makefile instead of ypmake. The Makefile and ypmake can co-exist, but it is recommended that you consider using the Makefile which is the standard mechanism for building maps on other vendor's machines.

Both the Makefile and ypmake script use five variables:


The directory containing the ASCII source files from which maps are constructed. DIR defaults to /etc.


Causes ypmake to construct maps for the specified NIS_domain. DOM defaults to the NIS domain shown by domainname (see domainname(1)).


When non-null (null by default), NOPUSH inhibits copying the new or updated databases to the slave NIS servers. Only slave NIS servers in the specified domain receive yppush notification when NOPUSH is null.


Does the same thing as NOPUSH=1 and sends a "clear current map" request to the local ypserv process.


Specifies the full pathname of the ASCII file that ypmake should use when building the NIS passwd maps. PWFILE defaults to $DIR/passwd.


Specifies the full pathname of the ASCII file that ypmake must use in conjunction with the PWFILE to build NIS password maps. SWFILE is ignored if SHADOW_MODE is set to 0 in /etc/rc.config.d/namesvrs. SWFILE defaults to $DIR/shadow.

The order of arguments passed to ypmake is unimportant, but the maps are built or updated in the left-to-right order provided.

Refer to ypfiles(4) and ypserv(1M) for an overview of Network Information Service.

NOTE: The /etc/hosts file contains IPv4 and IPv6 addresses. ypmake collects data from the /etc/hosts file and builds four maps, namely hosts.byaddr, hosts.byname, ipnodes.byaddr, and ipnodes.byname. The hosts.byaddr and hosts.byname maps contain IPv4 data and the ipnodes.byaddr and ipnodes.byname maps contain IPv4 and IPv6 data.


ypmake returns one of the following exit codes upon completion:


Normal termination; no problems.


One or more unrecognized arguments were passed.


The NIS domain name is not set.


The subdirectory used to contain maps for a specific NIS domain, /var/yp/domain_name, does not exist or is not writable.


An error was encountered when building at least one of the maps.


One or more maps' ASCII files do not exist or are unreadable.


Create or rebuild the password databases (both the passwd.byname and passwd.byuid maps) from /etc/passwd and use yppush to copy the databases to any slave NIS servers in the default NIS domain:

ypmake passwd.byname

Create or rebuild the hosts databases from /etc/hosts but do not copy the databases to any slave NIS servers:

ypmake hosts NOPUSH=1

Create or rebuild the network maps from /nis/sourcefiles/networks and copy the maps to any slave NIS servers in NIS domain DAE_NIS:

ypmake DOM=DAE_NIS networks DIR=/nis/sourcefiles


ypmake was developed by Sun Microsystems, Inc.


/etc/group /etc/hosts /etc/netgroup /etc/networks /etc/passwd /etc/protocols /etc/publickey /etc/rpc /etc/services

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.