xref: /netbsd-src/usr.bin/ypwhich/ypwhich.1 (revision 205b6ccb091fdd5183ac283952095308d576a81a)
1.\" $NetBSD: ypwhich.1,v 1.18 2009/06/21 15:04:07 wiz Exp $
2.\"
3.\" Copyright (c) 1994 Christopher G. Demetriou
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"      This product includes software developed by Christopher G. Demetriou.
17.\" 4. The name of the author may not be used to endorse or promote products
18.\"    derived from this software without specific prior written permission
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.Dd January 24, 2008
32.Dt YPWHICH 1
33.Os
34.Sh NAME
35.Nm ypwhich
36.Nd return hostname of NIS server of map master
37.Sh SYNOPSIS
38.Nm
39.Op Fl T
40.Op Fl d Ar domain
41.Op Oo Fl h Oc Ar host
42.Nm
43.Op Fl fTt
44.Op Fl d Ar domain
45.Op Fl h Ar host
46.Fl m Op Ar mname
47.Nm
48.Fl x
49.Sh DESCRIPTION
50.Nm
51tells which
52.Tn NIS
53server supplies
54.Tn NIS
55services to a client, or which is the master for a map.
56If invoked without arguments, it gives the
57.Tn NIS
58server for the local machine.
59If
60.Ar host
61is specified, that machine is queried to find out which
62.Tn NIS
63server it is using.
64.Pp
65The options are as follows:
66.Bl -tag -width Fl
67.It Fl d Ar domain
68Specify a domain other than the default domain.
69.It Fl f
70When used in conjunction with
71.Fl m ,
72force
73.Nm
74to query
75.Ar host
76directly, without using the local copy of
77.Xr ypbind 8 .
78.It Fl h Ar host
79Specify a host other than localhost to query for information.
80.It Fl m Op Ar mname
81Find the master
82.Tn NIS
83server for the named map.
84.Ar mname
85can be a map name or nickname.
86If
87.Ar mname
88is omitted,
89.Nm
90will produce a list of available maps.
91.It Fl T
92Use TCP protocol instead of UDP.
93.It Fl t
94Inhibit translation of map nicknames
95to their corresponding map names.
96.It Fl x
97Display the map nickname table, found in
98.Pa /var/yp/nicknames .
99A built-in default translation table is used if
100.Pa /var/yp/nicknames
101does not exist (see
102.Xr nicknames 5
103for details).
104.El
105.Sh EXIT STATUS
106.Nm
107exits with a non-zero exit code if
108.Fl m
109is used, and there was a problem in determining the map's master.
110.Sh SEE ALSO
111.Xr domainname 1 ,
112.Xr ypcat 1 ,
113.Xr ypmatch 1 ,
114.Xr nicknames 5 ,
115.Xr nis 8 ,
116.Xr ypbind 8 ,
117.Xr yppoll 8 ,
118.Xr ypset 8
119.Sh AUTHORS
120.An Charles D. Cranor
121.An Greywolf
122