Solaris Naming Setup and Configuration Guide

How to Configure an NIS+ Server

While it is possible to have a master or replica server serving more than one domain, doing so is not recommended.

  1. Log in as superuser to the new replica server.

    The following steps assume that you rebooted the workstation after you set it up as a NIS+ client, as instructed in "Configuring the Client". Rebooting starts the cache manager, which is a recommended prerequisite to the following step. If you did not reboot the workstation, restart the cache manager now, using nis_cachemgr.

  2. [NIS-Compatibility Only] Start the NIS+ daemon with -Y.

    Perform this step only if you are setting up the server in NIS-compatibility mode; if setting up a standard NIS+ server, perform Step 3 instead. This step also includes instructions for supporting the DNS forwarding capabilities of NIS clients.

    This step has two parts. The first part starts the NIS+ daemon in NIS-compatibility mode. The second part makes sure that when the server is rebooted, the NIS+ daemon restarts in NIS-compatibility mode.

    1. Run rpc.nisd with the -Y and -B flags.


      compatserver# rpc.nisd -Y -B

      The -Y option invokes an interface that answers NIS requests in addition to NIS+ requests. The -B option supports DNS forwarding.

    2. Edit the /etc/init.d/rpc file.

      Search for the string EMULYP=-Y in the /etc/init.d/rpc file and uncomment that line.

      To retain DNS forwarding capabilities, add a -B flag to the EMULYP=-Y line. (If you don't need to retain DNS forwarding capabilities, uncomment the line, but don't add the -B flag.)

      This step creates a directory called /var/nis/data and a transaction log file called trans.log, which is placed in /var/nis.


      compatserver# ls -F /var/nis
      NIS_COLD_START data/ trans.log data.dict

      The trans.log file is a transaction log. You can examine the contents of the transaction log by using the nislog command, described in the directories chapter of Solaris Naming Administration Guide.


      Caution - Caution -

      Do not move or rename the /var/nis or /var/nis/data directories. Do not move or rename the /var/nis/trans.log or /var/nis/data.dict files. If you are upgrading from Solaris Release 2.4 or earlier, the older /hostname subdirectory is automatically converted to /var/nis/data and the relevant files are converted as necessary. Do not change these new names after the conversion has occurred.


      Now this server is ready to be designated a master or replica of a domain, as described in Chapter 8, Configuring a Non-root Domain. This step completes this task. A task summary is provided on "Server Configuration Summary".

  3. [Standard NIS+ Only] Start the NIS+ daemon.

    Run the rpc.nisd command.


    server# rpc.nisd

    To verify that the NIS+ daemon is indeed running, use the ps command.


    server# ps -ef | grep rpc.nisd
    root 1081 1 16:43:33 ? 0:01 rpc.nisd
    root 1087 1004 11 16:44:09 pts/1 0:00 grep rpc.nisd

    This step creates a directory called /var/nis/data and a transaction log file called trans.log which is placed in /var/nis.


    compatserver# ls -F /var/nis
    NIS_COLD_START data/ trans.log data.dict

    The compatserver.log file is a transaction log. You can examine the contents of the transaction log by using the nislog command, described in the directories chapter of Solaris Naming Administration Guide.


    Caution - Caution -

    Do not move or rename the /var/nis or /var/nis/data directories. Do not move or rename the /var/nis/trans.log or /var/nis/data.dict files. If you are upgrading from Solaris Release 2.4 or earlier, the older /hostname subdirectory will be automatically converted to /var/nis/data and the relevant files will also be converted as necessary. Do not change these new names after the conversion has occurred.


    Now this server is ready to be designated a master or replica of a domain, as described in Chapter 8, Configuring a Non-root Domain. This step completes this task. A task summary is provided on "Server Configuration Summary".