Solaris Naming Administration Guide

Using the nisprefadm Command

The following sections describe how to use the nisprefadm command to set, modify, and delete server preferences.

The nisprefadm command is used to specify the servers that clients are to prefer.

The nisprefadm command has the following syntax:


nisprefadm -a|-m|-r|-u|-x|-l -L|-G [-o type] \
 [-d domain] \
 [-C machine] \
 servers
nisprefadm -F
Table 14-1 nisprefadm Command Options

Option 

Description 

-G

Create a global client_info table stored in the domain's org_dir directory. In other words, create a global preferred server list. This option must be used with either -C subnet to specify preferences for all the machines on a given subnet, or -C machine to specify preferences for an individual machine.

-L

Create a local client_info file stored in the local machine's /var/nis directory. In other words, create a preferred server list that applies only to the machine you are running the command on.

-o type

Specify an option. The valid options are: pref_type=all, which specifies that clients can use non-preferred servers if no preferred servers can be contacted, and pref_type=pref_only, which specifies that clients may only use the designated preferred servers.

-d domain

Create a global preferred server client_info table for the specified domain or subdomain. 

-C subnet

The number of a subnet to which the preferences will apply. 

-C machine

The name of a client machine. 

servers

One or more NIS+ servers. These are the servers that are to be preferred. 

-a

Add the specified servers to the server list. 

-m

Modify the server list. For example, you can use the -m option to change the preference number given to one or more servers.

-r

Remove the specified servers from the server list. 

-u

Clear the server list, and then add the specified servers. (In other words, replace the current server list with a new list of preferred servers.) 

-x

Remove the server list completely. 

-l

List (display) the current preferred server information. 

-F

Force changes to a preferred server list to take effect immediately. 


Note -

The -C machine option should not be used with the -L (local) flag because it has no effect. For example, suppose you are running nisprefadm on the altair machine. You use the -L flag to specify that the preferences you are specifying be written into altair's local client_info file. You also use a -C vega option to specify that the preferences you are creating be applied to the vega machine. The nisprefadmcommand then write your preferences for vega into altair's file. But vega will never see them because vega will always get its server preferences from either its own local client_info file or the domain's global client_info table. Thus, it only makes sense to use the -C option when running nisprefadm with the -G (global) flag