YPFILES(4) — Series 300 Only
NAME
ypfiles − the Yellow Pages database and directory structure
DESCRIPTION
The Yellow Pages (YP) network lookup service uses databases in the directory hierarchy under /usr/etc/yp. (Note: a symbolic link exists from /etc/yp to /usr/etc/yp.) These databases exist only on machines that act as YP servers. A database consists of two files created by makedbm(1M). One has the filename extension .pag and the other has the filename extension .dir. For example, the database named netgroup is implemented by the pair of files netgroup.pag and netgroup.dir. A database served by the YP is called a YP map.
A YP domain is a named set of Yellow Pages maps. Each YP domain is implemented as a subdirectory of /usr/etc/yp (whose name is the domain name) and contains the maps for that domain. Any number of YP domains can exist, and each can contain any number of maps.
Besides the databases contained in /usr/etc/yp/<domain>, master YP servers have files named <general_YP_mapname>.time that reside there, too. These files are merely empty files whose times of last modification are compared to those of the ASCII files from which the maps are built. The ypmake(1M) script performs these comparisons to determine whether the maps are current. The general_YP_mapname designation is described further in the following FILES section.
The YP lookup service does not require maps, although maps may be required for the normal operation of other parts of the system. The list of maps a YP server provides access to is neither restricted nor must it be all-inclusive. If a map exists in a given domain and a client asks about it, the YP serves it. For a map to be consistently accessible, it must exist on all YP servers that serve the domain. To provide data uniformity between the replicated maps, make an entry to run ypxfr(1M) periodically in root’s crontab(1M) file on each server. More information on this topic is in yppush(1M) and ypxfr(1M).
YP maps contain two special key-value pairs. The first key, YP_LAST_MODIFIED, has a 10-character (ASCII) order number as a value. The order number is the time(2) in seconds when the map was built. The second key is YP_MASTER_NAME, whose value is the host name of the map’s master YP server. The makedbm(1M) command generates both key-value pairs automatically. The ypxfr(1M) command uses these values when it transfers a map from one YP server to another.
Generate and modify YP maps only on the master server. They are copied to the slaves using ypxfr(1M) to avoid potential byte-ordering problems among YP servers running on machines with different architectures and to minimize the disk space required for the databases. The YP databases can be created initially for both masters and slaves by using ypinit(1M).
After the servers’ databases are created, the contents of some maps will change. Generally, an ASCII source version of each database exists on the master and is changed with a text editor. The YP map is rebuilt to include the changes and propagated from the master to the slaves by running the shell script ypmake(1M).
All standard YP maps are built by commands contained in the ypmake(1M) script; if you add a non-standard YP map, edit this script to support the new map. (The standard YP maps are discussed in the following FILES section.) The ypmake(1M) script uses makedbm(1M) to generate the YP maps on the master and may run yppush(1M) to copy the rebuilt maps to the slaves. The yppush(1M) command refers to the contents of the map named ypservers that contains the host names of all YP servers for the specific domain. For more information, see ypmake(1M), yppush(1M), and ypxfr(1M).
DEPENDENCIES
Series 300
If you want to create a new non-standard map for the Yellow Pages, its name cannot exceed 10 characters in length. This rule exists because the Series 300 has a 14-character length restriction on filenames and makedbm(1M) adds .dir and .pag suffixes to any mapname.
The following table describes the translation of standard YP mapnames to shorter names for storage on a Series 300. The standard mapnames should be used by YP clients on HP machines when making requests, regardless of which machine is the YP server.
Standard YP Series 300
Mapname Mapname
mail.aliases mail.alias
ethers.byaddr ether.byad
ethers.byname ether.byna
group.bygid group.bygi
group.byname group.byna
hosts.byaddr hosts.byad
hosts.byname hosts.byna
netgroup netgroup
netgroup.byhost netgr.byho
netgroup.byuser netgr.byus
networks.byaddr netwk.byad
networks.byname netwk.byna
passwd.byname passw.byna
passwd.byuid passw.byui
protocols.byname proto.byna
protocols.bynumber proto.bynu
rpc.bynumber rpc.bynu
services.byname servi.byna
ypservers ypservers
AUTHOR
Sun Microsystems, Inc.
FILES
The following text presents information about the standard Yellow Pages maps.
The General YP Mapname column lists names for sets of YP maps; the sets include adjacent entries from the Standard YP Mapname column.
The ASCII Source column lists the ASCII files from which the maps are usually built on HP master YP servers. The ypmake(1M) script permits the source directory, or file in the case of the passwd maps, to vary.
The Standard YP Mapname column lists names by which maps are stored on YP servers and referred to by YP clients.
General YP Standard YP
Mapname ASCII Source Mapname
aliases * mail.aliases
ethers * ethers.byaddr
ethers.byname
group /etc/group group.bygid
group.byname
hosts /etc/hosts hosts.byaddr
hosts.byname
netgroup /etc/netgroup netgroup
netgroup.byhost
netgroup.byuser
networks /etc/networks networks.byaddr
networks.byname
passwd /etc/passwd passwd.byname
passwd.byuid
protocols /etc/protocols protocols.byname
protocols.bynumber
rpc /etc/rpc rpc.bynumber
services /etc/services services.byname
ypservers ** ypservers
*These databases are not built on HP master Yellow Pages servers. However, if an HP machine is a slave to a master YP server that creates and distributes these databases, the HP slave YP server will store these databases. It is suggested that if you have a non-HP machine that requires these maps, make that machine the master YP server. By doing this, the maps should be built as needed.
**No ASCII source exists for the ypservers database. It is created from responses provided by the user of ypinit(1M) on the master YP server, and it has no matching ypservers.time file.
SEE ALSO
domainname(1M), makedbm(1M), rpcinfo(1M), ypinit(1M), ypmake(1M), yppoll(1M), yppush(1M), ypserv(1M), ypxfr(1M).
Hewlett-Packard Company — May 11, 2021