Go to main content

Working With Oracle® Solaris 11.4 Directory and Naming Services: DNS and NIS

Exit Print View

Updated: November 2020
 
 

Preparing /var/yp/Makefile

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 How to Set Up the NIS Master Server.

The ypinit script calls the make program, which uses /var/yp/Makefile. A default copy of the file 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 is, or modify it. 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 for NIS, 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 the passwd, shadow, and adjunct source files that are 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.

  • RBACDIR value

    If you want the Makefile to use the audit_user, auth_attr, exec_attr, and prof_attr source files that are stored in some directory other than /etc, you must change the value of RBACDIR 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 systems 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.