*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> nsquery (1)              
Title
Content
Arch
Section
 

Contents


 nsquery(1)                                                       nsquery(1)




 NAME    [Toc]    [Back]
      nsquery - query the Name Service Switch backend libraries

 SYNOPSIS    [Toc]    [Back]
      nsquery lookup_type lookup_query [lookup_policy]

 DESCRIPTION    [Toc]    [Back]
      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
                     [NOTFOUND=return] files

           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.

    Notes    [Toc]    [Back]
      Changing the default behavior for SUCCESS is not recommended.

 EXAMPLES    [Toc]    [Back]
      nsquery hosts hondo

      nsquery hosts 15.204.204.204 "dns files"

      nsquery passwd dog "nisplus"




 Hewlett-Packard Company            - 1 -   HP-UX 11i Version 2: August 2003






 nsquery(1)                                                       nsquery(1)




      nsquery passwd 105

      nsquery group wayne "nis [NOTFOUND=RETURN] files"

      nsquery group 22

 RETURN VALUE    [Toc]    [Back]
      0:   Success.

      1:   Invalid Usage.

      2:   Unknown ACTION.

      3:   No match found in any name services queried.

 AUTHOR    [Toc]    [Back]
      nsquery was developed by Hewlett-Packard.

 SEE ALSO    [Toc]    [Back]
      nsswitch.conf(4).


 Hewlett-Packard Company            - 2 -   HP-UX 11i Version 2: August 2003
[ Back ]
      
      
 Similar pages
Name OS Title
nsswitch.conf Tru64 name-service switch configuration file
nsswitch.conf FreeBSD name-service switch configuration file
nsdispatch FreeBSD name-service switch dispatcher routine
nsdispatch NetBSD name-service switch dispatcher routine
switch HP-UX configuration file for the name-service switch
nsdispatch Tru64 name service switch dispatcher routine
nsswitch.conf HP-UX configuration file for the name-service switch
winbindd.8 IRIX Name Service Switch daemon for resolving names from NT servers
nsswitch.conf Linux System Databases and Name Service Switch configuration file
dh_strip Linux strip executables, shared libraries, and some static libraries
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service