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

ypfiles(4)

HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

ypfiles — Network Information Service database and directory structure

DESCRIPTION

Note:

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.

The Network Information Service (NIS) network lookup service uses databases in the directory hierarchy under /var/yp. These databases exist only on machines that act as NIS servers. A database consists of two files created by makedbm (see 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 NIS is called an NIS map.

An NIS domain is a named set of Network Information Service maps. Each NIS domain is implemented as a subdirectory of /var/yp (whose name is the domain name) and contains the maps for that domain. Any number of NIS domains can exist, and each can contain any number of maps.

Besides the databases contained in /var/yp/domain, master NIS servers have files named general_NIS_mapname.time that reside there, too. These files are merely empty files whose times of last modification are compared with those of the ASCII files from which the maps are built. The ypmake script performs these comparisons to determine whether the maps are current (see ypmake(1M)). The general_NIS_mapname designation is described further in the FILES section below.

The NIS 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 an NIS 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 NIS serves it. For a map to be consistently accessible, it must exist on all NIS servers that serve the domain. To provide data uniformity between the replicated maps, make an entry to run ypxfr periodically in root's crontab file on each server (see ypxfr(1M) and crontab(1)). More information on this topic is in yppush(1M) and ypxfr(1M).

NIS maps contain two special key-value pairs. The first key, NIS_LAST_MODIFIED, has a 10-character (ASCII) order number as a value. The order number is the time() in seconds when the map was built (see time(2)). The second key is NIS_MASTER_NAME, whose value is the host name of the map's master NIS server. The makedbm command generates both key-value pairs automatically. The ypxfr command uses these values when it transfers a map from one NIS server to another.

Generate and modify NIS maps only on the master server. They are copied to the slaves using ypxfr to avoid potential byte-ordering problems among NIS servers running on machines with different architectures, and to minimize the disk space required for the databases (see ypxfr(1M)). NIS databases can be created initially for both masters and slaves by using ypinit (see ypinit(1M)).

After 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 NIS map is rebuilt to include the changes, and propagated from the master to the slaves by running the ypmake shell script (see ypmake(1M)).

All standard NIS maps are built by commands contained in the ypmake script or the NIS Makefile. If you add a non-standard NIS map, edit the ypmake script or Makefile to support the new map (standard NIS maps are discussed under FILES below). ypmake and Makefile use makedbm to generate the NIS maps on the master and may run yppush to copy the rebuilt maps to the slaves (see yppush(1M)). The yppush command reads the map named ypservers that contains the host names of all NIS servers for the specific domain. For more information, see ypmake(1M), yppush(1M), and ypxfr(1M).

DEPENDENCIES

If /var/yp is in a file system that does not allow file names longer than 14 characters and you want to create a new non-standard map for the Network Information Service, its name must not exceed 10 characters in length. This rule exists because makedbm adds the 4-character suffixes .dir and .pag to any mapname.

The following table describes the translation of standard NIS mapnames to shorter names for storage on a 14-character filename file system. The standard mapnames should be used by NIS clients on HP machines when making requests, regardless of which machine is the NIS server.

Standard NIS MapnameAbbreviated Mapname
auto.masterauto.mast
ethers.byaddrether.byad
ethers.bynameether.byna
group.bygidgroup.bygi
group.bynamegroup.byna
hosts.byaddrhosts.byad
hosts.bynamehosts.byna
ipnodes.byaddrip.byad
ipnodes.bynameip.byna
mail.aliasesmail.alias
mail.byaddrmail.byad
netgroupnetgroup
netgroup.byhostnetgr.byho
netgroup.byusernetgr.byus
netid.bynamenetid.byn
networks.byaddrnetwk.byad
networks.bynamenetwk.byna
passwd.bynamepassw.byna
passwd.byuidpassw.byui
protocols.bynameproto.byna
protocols.bynumberproto.bynu
publickey.bynamepbkey.byna
rpc.bynamerpc.byna
rpc.bynumberrpc.bynu
services.bynameservi.byna
ypserversypservers

AUTHOR

ypfiles was developed by Sun Microsystems, Inc.

FILES

The following table presents information about the standard Network Information Service maps.

The General NIS Mapname column lists names for sets of NIS maps; the sets include adjacent entries from the Standard NIS Mapname column.

The ASCII Source column lists the ASCII files from which the maps are usually built on HP master NIS servers. The ypmake script permits the source directory, or file in the case of the passwd maps, to vary.

The Standard NIS Mapname column lists names by which maps are stored on NIS servers and referred to by NIS clients.

General NISASCII SourceStandard NIS
Mapname Mapname
aliases/etc/mail/aliasesmail.aliases
mail.byaddr
automounter/etc/auto_masterauto.master
ethers *ethers.byaddr
ethers.byname
group/etc/groupgroup.byname
group.bygid
hosts/etc/hostshosts.byname
hosts.byaddr
ipnodes/etc/hostsipnodes.byname
ipnodes.byaddr
netgroup/etc/netgroupnetgroup
netgroup.byhost
netgroup.byuser
netid/etc/netidnetid.byname
networks/etc/networksnetwork.byaddr
network.byname
passwd/etc/passwdpasswd.byname
passwd.byuid
protocols/etc/protocolsprotocols.byname
protocols.bynumber
publickey/etc/publickeypublickey.byname
rpc/etc/rpcrpc.byname
rcp.bynumber
services/etc/servicesservi.bynp
services.byname
ypservers **ypservers

*

These databases are not built on HP master Network Information Service servers. However, if an HP machine is a slave to a master NIS server that creates and distributes these databases, the HP slave NIS 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 NIS 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 on the master NIS server, and it has no matching ypservers.time file.

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