HP-UX Reference (11i v2 04/09) - 1 User Commands N-Z (vol 2)
n
nis+(1) nis+(1)
partially qualified name. This expansion is actually done by the NIS+ library function nis_getnames (3N)
which generates a list of names using the default NIS+ directory search path or the
NIS_PATH environ-
ment variable. The default NIS+ directory search path includes all the names in its path.
nis_getnames()
is invoked by the functions nis_lookup (3N) and nis_list (3N) when the
EXPAND_NAME flag is used.
The
NIS_PATH environment variable contains an ordered list of simple names. The names are
separated by the colon (:) character. If any name in the list contains colons, the colon should be quoted
as described in the Grammar section. When the list is exhausted, the resolution function returns the
error NIS_NOTFOUND. This may mask the fact that the name existed but a server for it was unreach-
able. If the name presented to the list or lookup interface is fully qualified, the
EXPAND_NAME flag is
ignored.
In the list of names from the
NIS_PATH
environment variable, the "$" (dollar sign) character is treated
specially. Simple names that end with the label "$" have this character replaced by the default directory
(see nis_local_directory(3N)). Using "$" as a name in this list results in this name being replaced by the
list of directories between the default directory and the global root that contain at least two labels.
Below is an example of this expansion. Given the default directory of
some.long.domain.name.
,
and the
NIS_PATH variable set to fred.bar.:org_dir.$:$
. This path is initially broken up into
the list:
1
fred.bar.
2 org_dir.$
3 $
The dollar sign in the second component is replaced by the default directory. The dollar sign in the third
component is replaced with the names of the directories between the default directory and the global root
that have at least two labels in them. The effective path value becomes:
1
fred.bar.
2a org_dir.some.long.domain.name.
3a some.long.domain.name.
3b long.domain.name.
3c domain.name.
Each of these simple names is appended to the partially qualified name that was passed to the
nis_lookup (3N) or nis_list(3N) interface. Each is tried in turn until NIS_SUCCESS is returned or the
list is exhausted.
If the
NIS_PATH variable is not set, the path "$" is used.
The library function nis_getnames(3N) can be called from user programs to generate the list of names
that would be attempted. The program nisdefaults (1) with the
-s option can also be used to show the
fully expanded path.
Concatenation Path
Normally all the entries for a certain type of information are stored within the table itself. However,
there are times when it is desirable for the table to point to other tables where entries can be found. For
example, you may want to store all the IP addresses in the host table for their own domain, and yet want
to be able to resolve hosts in some other domain without explicitly specifying the new domain name.
NIS+ provides a mechanism for concatenating different but related tables with an "NIS+ Concatenation
Path". With a concatenation path, you can create a sort of flat namespace from a hierarchical structure.
You can also create a table with no entries and just point the hosts or any other table to its parent
domain. Note that with such a setup, you are moving the administrative burden of managing the tables
to the parent domain. The concatenation path will slow down the request response time because more
tables and more servers are searched. It will also decrease the availability if all the servers are incapaci-
tated for a particular directory in the table path.
The NIS+ Concatenation Path is also referred to as the "table path". This path is set up at table creation
time through nistbladm(1). You can specify more than one table to be concatenated and they will be
searched in the given order. Note that the NIS+ client libraries, by default, will not follow the concatena-
HP-UX 11i Version 2: September 2004 − 3 − Hewlett-Packard Company Section 1−−633