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

Preface

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+

Glossary

Index

Optimizing NIS+ Server Use

This section provides an overview of server-use customization.

nis_cachemgr Is Required

Server-use customization requires that a client be running nis_cachemgr. If a client machine is not running nis_cachemgr, it cannot make use of server-use customization. If there is no nis_cachemgr running on a client machine, that client will use the first server it identifies as described in Default NIS+ Client Search Behavior.

NIS+ Global Table or Local File

Depending on how you use the nisprefadm command, it creates either a local client_info file or a domain client_info table:


Caution

Caution - Use only the nisprefadm command to make changes to client_info files and tables. Never use other NIS+ commands such as nistbladm.


When working with client_info tables or files, you must use either the -G or the -L option to specify that your command apply to either the global table (-G) or local file (-L) of the machine you are running the command on.

NIS+ Preference Rank Numbers

Server preferences are controlled by giving each server a preference rank number. Clients search for NIS+ servers in order of numeric preference, querying servers with lower preference rank numbers before seeking servers with higher numbers.

Thus, a client will first try to obtain namespace information from NIS+ servers with a preference of zero. If there are no preference=0 servers available, then the client will query servers whose preference=1. If no 1's are available, it will try to find a 2, and then a 3, and so on until it either gets the information it needs or runs out of servers.

Preference rank numbers are assigned to servers with the nisprefadm command as described in Specifying NIS+ Global Server Preferences.

Server preference numbers are stored in client_info tables and files. If a machine has its own /var/nis/client_info file, it uses the preference numbers stored in that file. If a machine does not have its own client_info file, it uses the preference numbers stored in the domain's client_info.org_dir table. These client_info tables and files are called “preferred server lists” or simply server lists.

You customize server usage by controlling the server preferences of each client. For example, suppose a domain has a client machine named mailer that makes heavy use of namespace information and the domain has both a master server (nismaster) and a replica server (replica1). You could assign a preference number of 1 to nismaster and a number of 0 to replica1 for the mailer machine. The mailer machine would then always try to obtain namespace information from replica1 before trying nismaster. You could then specify that for all the other machines on the subnet the nismaster server had a preference number of zero and replica1 the number 1. This would cause the other machine to always try nismaster first.

You can give the same preference number to more than one server in a domain. For example, you could assign both nismaster1 and replica2 a preference number of 0, and assign replica3, replica4, and replica5 a preference number of 1.

Default NIS+ Server Preferences

If there is no client_info file or table, the cache manager automatically assigns all servers on the local subnet a default preference number of zero (0) and all servers outside the local subnet a preference of infinite. The purpose of nisprefadm is to change these default preference numbers to what you want them to be.

Efficiency and NIS+ Server Preference Numbers

A client must seek all servers with a given preference number before searching for servers with the next higher number. It requires 5 or more seconds for a client to search for all the servers with a given preference number. This means that if you have a master server and 4 replicas in a domain, and you give each one a different preference number from 0 to 4, it could take a client more than 25 seconds to run through all of those preference levels.

To maximize performance, you should not use more than two or three levels of server preference. For example, in the case described above, it is better to give one of those five servers a preference=0 and all the others a preference of 1, or give two of them a preference of 1 and the remaining three a preference of 2.

Preferred-Only NIS+ Servers and All Servers

Server lists also specify what a client does if it cannot find any preferred servers. A preferred server is any server with a preference of zero, or any server that you have assigned a preference number with nisprefadm.

By default, if a client fails to reach a preferred server, it will then seek out any server it can find anywhere on the network using the search mode described in Default NIS+ Client Search Behavior. You can change this default behavior with the nisprefadm -o option to specify that a client can only use preferred servers and if no servers are available it cannot go to non-preferred servers. See Specifying Preferred-Only Servers in NIS+ for details.


Note - This option is ignored when the machine's domain is not served by any preferred servers.


Viewing NIS+ Preferences

To view the server preferences currently in effect for a particular client machine, you run nisprefadm with the -l option as described in Viewing NIS+ Machine Preferences.

NIS+ Server and Client Names

When specifying server or client machines, keep in mind the following points:

NIS+ Server Preferences

To specify a server preference for:

When NIS+ Server Preferences Take Effect

Changes you make to a machine or subnet's server preferences normally do not take effect on a given machine until that machine updates it nis_cachemgr data. When the nis_cachemgr of a machine updates its server-use information depends on whether the machine is obtaining its server preferences from a global client_info table or a local /var/nis/client_info file (see NIS+ Global Table or Local File).

However, you can force server preference changes to take effect immediately by running nisprefadm with the -F option. The -F option forces nis_cachemgr to immediately update its information. See Putting NIS+ Server Preferences Into Immediate Effect for details.