makedbm and Makefile: Creating Maps

NIS maps are created by the makedbm command, converting text files into DBM format files. To simplify maintaining your maps, NIS provides a makefile for use with the make command. The default makefile (/var/yp/Makefile) contains all the instructions necessary to create all the default maps. You can add stanzas to /var/yp/Makefile to create additional maps. However, the default makefile is sufficient to address the basic needs of most NIS installations.

When the makedbm command generates an NIS map, it creates two files: map.key.pag and map.key.dir. For example, the host.byname map consists of the hosts.byname.pag and hosts.byname.dir files. The file with the .pag extension contains the key and value pairs, while the file with the .dir extension is the index for the .pag file. All the maps for a domain are stored on the servers in a subdirectory of the /var/yp directory. The subdirectory has the same name as the domain. For example, maps for the literature domain are located in the /var/yp/literature subdirectory.