NFS Services Administrator's Guide
Configuring and Administering NIS+
Administering NIS+
Chapter 5 237
To Change the Search Order of Domains
When a client requests information from an NIS+ table without
specifying a domain, by default, the table in the client’s default domain is
searched first. If the information is not found, and the default domain is
not the root domain, the table in the default domain’s parent domain is
searched. The search continues up the hierarchy until the information is
found or the root domain has been searched.
You can override this default search path by setting the NIS_PATH
environment variable.
• If you are using the Korn or Bourne shell, issue the following
commands:
NIS_PATH=domain:domain:...
export NIS_PATH
• If you are using the C shell, issue the following command:
setenv NIS_PATH domain:domain:...
You can use the $ character as a wildcard, as in the following example:
NISPATH=’org_dir.$:$:Eng.Wiz.Com.’
Single quotes are required to prevent the shell from interpreting the $
character.
When the $ character replaces part of a domain path name, as in
org_dir.$, it represents the default domain. So, if the default domain is
Sales.Wiz.Com., the domain path org_dir.$ is interpreted as
org_dir.Sales.Wiz.Com.
When the $ character is used to represent an entire domain path name,
like the second $ character in the example above, it represents the
default search path (default domain, then parent domain, and on up to
the root domain). If your default domain is Sales.Wiz.Com., and the
root domain is Wiz.Com., the NIS_PATH value shown in the above creates
the following search path:
• org_dir.Sales.Wiz.Com.
• Sales.Wiz.Com.
• Wiz.Com.
• Eng.Wiz.Com.
For more information, type man 1 nis at the HP-UX prompt.