After checking the source files and copying them into the source file directory, you now need to convert those source files into the ndbm format maps that the NIS service uses. This is done automatically for you by ypinit when called on the master server, as explained in the next section, How to Set Up the Master Server With ypinit.
The ypinit script calls the program make, which uses the Makefile located in the /var/yp directory. A default Makefile is provided for you in the /var/yp directory and contains the commands needed to transform the source files into the desired ndbm format maps.
You can use the default Makefile as it is, or modify it if you want. (If you do modify the default Makefile, be sure to first copy and store the original default Makefile in case you need it for future use.) You might need to make one or more of the following modifications to the Makefile:
Nondefault maps
If you have created your own non-default source files and want to convert them to NIS maps, you must add those source files to the Makefile.
DIR
value. If you want the Makefile to use source files
stored in some directory other than /etc, as explained
in Source Files Directory, you must change the value of DIR
in the Makefile to
the directory that you want to use. When changing this value in the Makefile, do not indent the line.
PWDIR
value
If you want the Makefile to use passwd, shadow, and/or adjunct
source files stored in some directory other than /etc,
you must change the value of PWDIR
in the Makefile to the directory that you want to use.
When changing this value in the Makefile, do not indent
the line.
Domain name resolver
If you want the NIS server to use the domain name resolver for machines not in the current domain, comment out the Makefile line B=, and uncomment (activate) the line B= -b.
The function of the Makefile is to create the appropriate NIS maps for each of the databases listed under all. After passing through makedbm the data is collected in two files, mapname.dir and mapname.pag. Both files are in the /var/yp/domainname directory on the master server.
The Makefile builds passwd maps from the /PWDIR/passwd, /PWDIR/shadow, and /PWDIR/security/passwd.adjunct files, as appropriate.