System Administration Guide: Naming and Directory Services (NIS+)

ProcedureHow 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 machine after you set it up as an NIS+ client, as instructed in Configuring the NIS+ Client. Rebooting starts the cache manager, which is a recommended prerequisite to the following step. If you did not reboot the machine, restart the NIS+ service now by using svcadm.

  2. (Optional) Edit the /lib/svc/method/nisplus file to add the options you want.

    Use your preferred text editor.

    See NIS+ and the Service Management Facility for more information about editing the /lib/svc/method/nisplus file.

    -B

    Supports DNS forwarding

    -Y

    Starts the NIS+ daemon in NIS-compatibility mode

  3. Start the NIS+ daemon.


    server# svcadm enable network/rpc/nisplus:default

    To verify that the NIS+ service is running, use the svcs command.


    server# svcs \*nisplus\*
    STATE        STIME    FMRI
    online       Jan_12   svc:/network/rpc/nisplus:default

    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 nislog Command.


    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 a Solaris 2 release, 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 an NIS+ Non-Root Domain. This step completes this task. A task summary is provided on NIS+ Server Configuration Summary.