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

NIS+ and the Service Management Facility

Most of the command line administrative tasks associated with the NIS+ service are managed by the Service Management Facility (SMF). For an overview of SMF, refer to Chapter 18, Managing Services (Overview), in System Administration Guide: Basic Administration. Also refer to the svcadm(1M) and svcs(1) man pages for more details.

Using svcadm With rpc.nisd -x

In general, the /usr/sbin/rpc.nisd daemon is administered using the svcadm command. However, when rpc.nisd is invoked with -x nisplusLDAPinitialUpdateOnly=yes, rpc.nisd performs the specified action, then exits. That is, rpc.nisd does not daemonize. SMF should not be used in conjunction with -x nisplusLDAPinitialUpdateOnly=yes. SMF can be used any other time you want to start, stop, or restart the rpc.nisd daemon.

The following example shows rpc.nisd used with -x nisplusLDAPinitialUpdateOnly=yes.


# /usr/sbin/rpc.nisd -m mappingfile \
-x nisplusLDAPinitialUpdateAction=from_ldap \
-x nisplusLDAPinitialUpdateOnly=yes

Modifying the /lib/svc/method/nisplus File

If you want to include specific options when you invoke the rpc.nisd daemon with SMF, add the options to the /lib/svc/method/nisplus file. The following list provides some commonly used options.

-S 0

Sets the server's security level to 0, which is required at this point for bootstrapping.

Because no cred table exists yet, no NIS+ principals can have credentials. If you use a higher security level, you are locked out of the server.

-B

Supports DNS forwarding

-Y

Starts the NIS+ daemon in NIS-compatibility mode

ProcedureHow to Modify the /lib/svc/method/nisplus File

  1. Become superuser or assume an equivalent role.

    Roles contain authorizations and privileged commands. For more information about roles, see Chapter 9, Using Role-Based Access Control (Tasks), in System Administration Guide: Security Services.

  2. Stop the NIS+ service.


    # svcadm disable network/rpc/nisplus:default
    
  3. Open the /lib/svc/method/nisplus file.

    Use your preferred text editor.

  4. Edit the file to add the desired options.

    Example –

    Change:


    /usr/sbin/rpc.nisd $nisd_flags || exit $?

    To:


    /usr/sbin/rpc.nisd $nisd_flags -Y -B || exit $?

    In this example, the -Y and -B options are added to rpc.nisd, so the options are automatically implemented at startup.

  5. Save and quit.

  6. Start the NIS+ service.


    # svcadm enable network/rpc/nisplus:default