Maps for each domain are located in a separate, distinct /var/yp/domainname directory on the NIS server. For example, the maps for a machine that belong to the domain accounting will be located in the directory /var/yp/accounting on their corresponding NIS server.
UnixWare supplies a Makefile in the directory /var/yp of machines designated as master servers at installation time. Running ypbuild in that directory (as explained in ``Making the maps'') causes makedbm(1Mnis) to create the default NIS maps from the input files.
The manual pages for ypfiles(4nis) and dbm(3rpc) completely explain the dbm file format. Input to makedbm must be in the form of key/value pairs, where key is the first word of each line and value is whatever follows in that line. The pairs of keys and values are preserved in the NIS maps, so programs can use the keys to look up the values. The input can be from a file or from standard input (as when modified through a script; see ``Making the maps''). After passing through makedbm, the data is collected in non-ASCII form in two files, mapname.dir and mapname.pag, both in the /var/yp/domainname directory on the master server.
``A summary of NIS maps'' provides a complete listing and explanation of NIS maps.
A summary of NIS maps
|Contains pathnames of files clients need during booting such as root, swap, possibly others. Once the NIS map is created, /etc/bootparams is never consulted.
|Contains machine names and Ethernet addresses. The Ethernet address is the key in the map. Once the NIS map is created, /etc/ethers is never consulted.
|Same as ethers.byaddr, except key is machine name instead of Ethernet address.
|Contains group security information with group ID as the key. With NIS, the local /etc/group is consulted first, then the map.
|Contains group security information with group name as the key. With NIS, the local /etc/group is consulted first, then the map.
|Contains host names and IP addresses. The IP address is the key in the map. The source for host information is determined by the entries in the /etc/netconfig file. For more information, see the netconfig(4bnu) manual page.
|Same as hosts.byaddr, except key is host name instead of IP address.
|Contains aliases and mail addresses. The alias is the key in the map. With NIS, the local /etc/aliases is consulted first, then the map.
|Same as mail.aliases, except key is mail address instead of alias.
|Contains group name, user name and host name. The host name is the key in the map. Once the NIS map is created, /etc/netgroup is never consulted.
|Same as netgroup.byhost, except key is user name instead of host name.
|Same as netgroup.byhost, except key is group name instead of host name.
|Contains machine name and mail address (including domain name). If there is a netid file available, it is consulted in addition to the data available through the other files.
|Contains network masks to be used with IP subnetting. The network mask is the key in the map. Once the NIS map is created, /etc/netmasks is never consulted.
|Contains names of networks known to your system and their IP addresses. The network address is the key in the map. Once the NIS map is created, /etc/networks is never consulted.
|Same as networks.byaddr, except key is network name instead of network address.
|Contains password information. The user name is the key in the map. With NIS, the local /etc/passwd is consulted first, then the map.
|Same as passwd.byname, except key is user ID instead of user name.
|Contains network protocols known to your system. The protocol name is the key in the map. Once the NIS map is created, /etc/protocols is never consulted.
|Same as protocols.byname, except key is protocol number instead of protocol name.
|Contains public and secret keys. Once the NIS map is created, /etc/publickey is never consulted.
|Contains program number and name of RPCs known to your system. The RPC program number is the key in the map. Once the NIS map is created, /etc/rpc is never consulted.
|Lists Internet services known to your network. The service name is the key in the map. Once the NIS map is created, /etc/services is never consulted.
|Lists NIS servers known to your network.