You can learn how to make customized NIS maps by using the /usr/ccs/bin/make command and the /var/yp/Makefile file. The make utility and the Makefile file:

  • Are used by programmers to build programs
  • Are used by administrators to build NIS maps
  • Can be generalized to build customized NIS maps

Building Targets

The make utility receives its instructions from the Makefile file. The Makefile file uses variable definitions (called macros), targets, and dependencies.

You can use macros as variables, similar to those used in a shell script. You must define a macro at the beginning of the Makefile file. Prefix the name of the macro with a dollar sign ($) when using it throughout the Makefile file.

Comments Off

You should have at least one NIS slave server to provide backup if the NIS master server becomes unavailable. To configure an NIS slave server, complete the following steps on the system that you want to designate as the slave server:

  1. Edit the /etc/inet/hosts file to ensure that the NIS master and all NIS slave servers have been defined.
  2. Execute the domainname command to set the local NIS domain.
    # domainname domainname

    For example:

    # domainname classroom.Central.Sun.COM 
  3. Create or populate the /etc/defaultdomain file with the domain name.
  4. Initialize the system as an NIS client by performing the command:
    # ypinit -c