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

Specifying NIS+ Global Server Preferences

You can set global server preferences for a local or remote domain. Preferences may be set for individual machines and all the machines on a subnet.

The procedures in this section describe how to specify server preferences in a global client_info table residing on the NIS+ domain's master server. Once the table exists on the master server, NIS+ replicates it on to any existing replica servers for the domain.

To assign server preference numbers, run nisprefadm with either the:

ProcedureHow to Set Global Preferences for an NIS+ Subnet

To assign server preferences in the global table for all the machines on a subnet:

  1. Run nisprefadm with the -G and -C subnet options.


    #nisprefadm -G -a -C subnet servers (preferences)

    Where:

    • -C subnet identifies the IP number of the subnet the preferences will apply to.

    • servers(preferences) are one or more servers with optional preference ranking numbers.

      For example, to specify that the subnet 172.22.123.123 uses the nismaster and replica3 servers with a default preference number of zero and the manf.replica6 server with a preference number of 1, type the following.


      polaris# nisprefadm -a -G -C 172.22.123.123 nismaster1 \
      replica3 "manf.replica6(1)"

ProcedureHow to Set Global Preferences for an Individual NIS+ Machine

  1. Run nisprefadm with the -G, and -C machine options.


    #nisprefadm -G -a -C machine servers (preferences)

    Where:

    • -C machine identifies the machine the preferences will apply to. (Depending on the shell you are using, you may need to enclose machine in quotes.)

    • servers(preferences) are one or more servers with optional preference ranking numbers.

      For example, to replace the current preferences for the machine cygnus with replica7 and replica9 both with a default preference number of zero, type the following.


    polaris# nisprefadm -u -G -C cygnus replica7 replica9

ProcedureHow to Set Global Preferences for a Remote NIS+ Domain

To assign server preferences for an individual machine in a remote domain or all the machines on a subnet in a remote domain:

  1. Run nisprefadm with the -C, -G, and -d options.


    #nisprefadm -a -G -C name \
     -d domain servers(preferences)
    

    Where:

    • name is the IP number of a subnet or the name of a machine. The modifications you make with this command apply to the subnet or machine that you name.

    • domainname is the name of the remote domain.

    • servers(preferences) are one or more servers with optional preference ranking numbers.

    For example, to add the nismaster2 server with a default preference number of zero to the preferred server list of the 10.10.111.11 subnet in the remote sales.doc.com domain:


    polaris# nisprefadm -a -G -C 10.10.111.11 -d sales.doc.com. nismaster2