[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6


ypwhich Command

Purpose

Identifies either the Network Information Services (NIS) server or the server that is the master for a given map.

Syntax

To Identify the NIS Server

/usr/bin/ypwhich [ -d Domain ] [ -V1 | -V2 ] [ HostName ]

To Identify the Master NIS Server for a Map

/usr/bin/ypwhich [ -t ] [ -d Domain ] [ -mMapName ] ]

To Display the Map Nickname Table

/usr/bin/ypwhich -x

Description

The ypwhich command identifies which server supplies Network Information Services (NIS) services or which server is the master for a map, depending on how the ypwhich command is invoked. If invoked without arguments, this command displays the name of the NIS server for the local machine. If you specify a host name, the system queries that host to find out which master it is using.

Flags


-d Domain Uses the specified domain instead of the default domain.
-V1 Indicates which server is serving the old version 1 NIS protocol client processes.
-V2 Indicates which server is serving the current version 2 NIS protocol client processes. If neither version is specified, the ypwhich command attempts to locate the server that supplies the version 2 services. If there is no version 2 server currently bound, the ypwhich command then attempts to locate the server supplying version 1 services. Since servers and clients are both backward-compatible, the user need seldom be concerned about which version is currently in use.
-t Inhibits nickname translation, which is useful if there is a map name identical to a nickname.
-m MapName Finds the master NIS server for a map. No host can be specified with the -m flag. The MapName variable can be a map name or a nickname for a map. When the map name is omitted, the -m flag produces a list of available maps.
-x Displays the map nickname table. This lists the nicknames (MapName) the command knows of and indicates the map name associated with each nickname.

Examples

  1. To find the master server for a map, enter:

    ypwhich -m passwd
    

    In this example, the ypwhich command displays the name of the server for the passwd map.

  2. To find the map named passwd, rather than the map nicknamed passwd, enter:

    ypwhich -t -m passwd
    

    In this example, the ypwhich command displays the name of the server for the map whose full name is passwd.

  3. To find out which server serves clients that run the old version 1 of the NIS protocol, enter:

    ypwhich -V1
    
  4. To display a table of map nicknames, enter:

    ypwhich -x
    

Related Information

The ypset command.

The ypserv daemon.

Network File System (NFS) Overview for System Management in AIX 5L Version 5.1 System Management Guide: Communications and Networks.

Network Information Services (NIS) Overview for System Management in AIX 5L Version 5.1 Network Information Services (NIS and NIS+) Guide.

NIS Reference.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]