nsquery - query the Name Service Switch backend libraries
nsquery lookup_type lookup_query [lookup_policy]
nsquery is used to find the Name Service that returned the response to
a gethostbyname(), gethostbyaddr(), getpwnam(), getpwuid(),
getgrnam(), or getgrgid() function call. This application is Name
Service Switch aware and follows the lookup policies in
/etc/nsswitch.conf. The lookup types supported are:
hosts Used to resolve host name or IP Address lookups.
passwd Used to resolve user name or UID lookups.
group Used to resolve group name or GID lookups.
The lookup query can either be a host name, IP Address, user name,
user ID, group name or group ID.
The lookup policy must be a valid lookup policy described in
nsswitch.conf(4). If the policy is invalid, the system default policy
will be used.
The default policies are:
hosts dns [NOTFOUND=return TRYAGAIN=return] nis
passwd files nis
group files nis
nsquery will display the lookup policy being used, the name of the
service being queried, and the result of the query.
If the result of the query was successful, the appropriate structure
will be displayed.
nsquery hosts hondo
nsquery hosts 126.96.36.199 "dns files"
nsquery passwd dog "nisplus"
nsquery passwd 105
Hewlett-Packard Company - 1 - HP-UX Release 11i: November 2000
nsquery group wayne "nis [NOTFOUND=RETURN] files"
nsquery group 22
1: Invalid Usage.
2: Unknown ACTION.
3: No match found in any name services queried.
nsquery was developed by Hewlett-Packard.
Changing the default behavior for SUCCESS is not recommended.
Hewlett-Packard Company - 2 - HP-UX Release 11i: November 2000