ypmake(1M)
NAME
ypmake − create or rebuild Network Information Service databases
SYNOPSIS
/usr/etc/yp/ypmake [DIR= source_directory] [DOM= NIS _domain] \
[NOPUSH=1] [PWFILE= passwd_file] [map ...]
cd /usr/etc/yp; make [DIR= source_directory] [DOM= NIS _domain] \
[NOPUSH=1] [PWFILE= passwd_file] [map ...]
DESCRIPTION
ypmake is a shell script in /usr/etc/yp 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. yppush is then executed 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 in /usr/etc/yp calls the ypmake script to actually construct the maps. Better performance is achieved if ypmake is called directly, instead of via make.
Both the Makefile and ypmake script use four variables:
DIR=source_directory The directory containing the ASCII source files from which maps are constructed. DIR defaults to /etc.
DOM=NIS_domain Causes ypmake to construct maps for the specified NIS _domain. DOM defaults to the NIS domain shown by domainname (see domainname(1)).
NOPUSH=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.
PWFILE=passwd_file Specifies the full pathname of the ASCII file that ypmake should use when building the NIS passwd maps. PWFILE defaults to $DIR/passwd.
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.
DIAGNOSTICS
ypmake returns one of the following exit codes upon completion:
0 Normal termination; no problems.
1 One or more unrecognized arguments were passed.
2 The NIS domain name is not set.
3 The subdirectory used to contain maps for a specific NIS domain, /usr/etc/yp/domain_name, does not exist or is not writable.
4 An error was encountered when building at least one of the maps.
5 One or more maps’ ASCII files do not exist or are unreadable.
EXAMPLES
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
AUTHOR
ypmake was developed by Sun Microsystems, Inc.
FILES
/etc/group
/etc/hosts
/etc/netgroup
/etc/networks
/etc/passwd
/etc/protocols
/etc/rpc
/etc/services
/etc/vhe_list
SEE ALSO
domainname(1), make(1), makedbm(1M), vhe_altlog(1M), vhe_mounter(1M), vhe_u_mnt(1M), ypinit(1M), yppush(1M), ypserv(1M), group(4), hosts(4), netgroup(4), networks(4), passwd(4), protocols(4), rpc(4), services(4), vhe_list(4), ypfiles(4).
Hewlett-Packard Company — HP-UX Release 9.0: August 1992