Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
NFS Services Administrator's Guide: HP-UX 11i version 2 > Chapter 6 Configuring the Name Service Switch

Troubleshooting the Name Service Switch

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

  • Issue the nsquery command to perform a hosts, passwd, or group lookup, as follows:

    /usr/contrib/bin/nsquery lookup_type lookup_query

    The lookup_type may be hosts, passwd, or group.

    The lookup_query may be a host name or IP address, a user name or user ID, or a group name or group ID.

The nsquery command displays the Name Service Switch configuration that is currently in use. Then, it displays the results of the query. The following example uses nsquery to perform a lookup of the host name romney:

# /usr/contrib/bin/nsquery hosts romney

Using “nisplus [NOTFOUND=return] files” for the hosts policy.

Searching nisplus for romney
romney was NOTFOUND

Switch configuration: Terminates Search

As an optional third argument to nsquery, you can supply a Name Service Switch configuration in double quotes, as in the following example:

# /usr/contrib/bin/nsquery passwd 30 “files nis”

Using “files nis” for the passwd policy.

Searching /etc/passwd for 30
User name: www
User Id: 30
Group Id: 1
Gecos:
Home Directory: /
Shell:

Switch configuration: Terminates Search

For more information, type man 1 nsquery at the HP-UX prompt.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 2004 Hewlett-Packard Development Company, L.P.