JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Naming and Directory Services (NIS+)
search filter icon
search icon

Document Information


Part I About Naming and Directory Services

1.  Name Service Switch

Part II NIS+ Setup and Configuration

2.  NIS+: An Introduction

3.  NIS+ Setup Scripts

4.  Configuring NIS+ With Scripts

5.  Setting Up the NIS+ Root Domain

6.  Configuring NIS+ Clients

7.  Configuring NIS+ Servers

8.  Configuring an NIS+ Non-Root Domain

9.  Setting Up NIS+ Tables

Part III NIS+ Administration

10.  NIS+ Tables and Information

11.  NIS+ Security Overview

12.  Administering NIS+ Credentials

13.  Administering NIS+ Keys

14.  Administering Enhanced NIS+ Security Credentials

15.  Administering NIS+ Access Rights

16.  Administering NIS+ Passwords

17.  Administering NIS+ Groups

18.  Administering NIS+ Directories

19.  Administering NIS+ Tables

20.  NIS+ Server Use Customization

NIS+ Servers and Clients

Default NIS+ Client Search Behavior

Designating NIS+ Preferred Servers

NIS+ Over Wide Area Networks

Optimizing NIS+ Server Use

nis_cachemgr Is Required

NIS+ Global Table or Local File

NIS+ Preference Rank Numbers

Default NIS+ Server Preferences

Efficiency and NIS+ Server Preference Numbers

Preferred-Only NIS+ Servers and All Servers

Viewing NIS+ Preferences

NIS+ Server and Client Names

NIS+ Server Preferences

When NIS+ Server Preferences Take Effect

Using the nisprefadm Command

Viewing NIS+ Machine Preferences

How to View Preferences for an NIS+ Server

How to View Preferences for an NIS+ Machine

How to View Global Preferences for an NIS+ Machine

How to View Global Preferences for an NIS+ Subnet

Specifying NIS+ Preference Rank Numbers

Specifying NIS+ Global Server Preferences

How to Set Global Preferences for an NIS+ Subnet

How to Set Global Preferences for an Individual NIS+ Machine

How to Set Global Preferences for a Remote NIS+ Domain

Specifying Local NIS+ Server Preference

How to Set Preferences on a Local NIS+ Machine

Modifying NIS+ Server Preferences

How to Change an NIS+ Server's Preference Number

How to Replace One NIS+ Server With Another in a Preference List

How to Remove NIS+ Servers From Preference Lists

Replacing an Entire Preferred Server List in NIS+

Specifying Preferred-Only Servers in NIS+

How to Specify Preferred-Only Servers in NIS+

How to Revert to Using Non-Preferred Servers in NIS+

Ending Use of Server Preferences in NIS+

Eliminating Local Server Preferences in NIS+

How to Switch From Local to Global Subnet Preferences in NIS+

How to Switch From Local to Machine-Specific Global Preferences in NIS+

How to Stop a Machine From Using Any Server Preferences in NIS+

Putting NIS+ Server Preferences Into Immediate Effect

21.  NIS+ Backup and Restore

22.  Removing NIS+

23.  Information in NIS+ Tables

24.  NIS+ Troubleshooting

A.  NIS+ Error Messages

About NIS+ Error Messages

Common NIS+ Namespace Error Messages

B.  Updates to NIS+ During the Solaris 10 Release

Solaris 10 and NIS+



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] \
nisprefadm -F

Table 20-1 nisprefadm Command Options

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.
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.
One or more NIS+ servers. These are the servers that are to be preferred.
Add the specified servers to the server list.
Modify the server list. For example, you can use the -m option to change the preference number given to one or more servers.
Remove the specified servers from the server list.
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.)
Remove the server list completely.
List (display) the current preferred server information.
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.