Solaris Naming Administration Guide

NIS Maps Overview

NIS maps are essentially two-column tables. One column is the key and the other column is information value related to the key. NIS finds information for a client by searching through the keys. Some information is stored in several maps because each map uses a different key. For example, the names and addresses of machines are stored in two maps: hosts.byname and hosts.byaddr. When a server has a machine's name and needs to find its address, it looks in the hosts.byname map. When it has the address and needs to find the name, it looks in the hosts.byaddr map.

Maps for a domain are located in each server's /var/yp/domainname directory. For example, the maps that belong to the domain test.com are located in each server's /var/yp/test.com directory.

An NIS Makefile is stored in the /var/yp directory of machines designated as a NIS server at installation time. Running make in that directory causes makedbm to create or modify the default NIS maps from the input files. (See Solaris Naming Setup and Configuration Guide for a description of using this process to initially set up your NIS name space.)


Note -

Never make the maps on a slave server. Always run make on the master server.


The information in NIS maps is stored in ndbm format. The ypfiles and ndbm man pages explain the format of the map file.