xref: /netbsd-src/usr.bin/ypwhich/ypwhich.1 (revision 205b6ccb091fdd5183ac283952095308d576a81a)
1*205b6ccbSwiz.\" $NetBSD: ypwhich.1,v 1.18 2009/06/21 15:04:07 wiz Exp $
2817b0f26Scgd.\"
3817b0f26Scgd.\" Copyright (c) 1994 Christopher G. Demetriou
4817b0f26Scgd.\" All rights reserved.
5817b0f26Scgd.\"
6817b0f26Scgd.\" Redistribution and use in source and binary forms, with or without
7817b0f26Scgd.\" modification, are permitted provided that the following conditions
8817b0f26Scgd.\" are met:
9817b0f26Scgd.\" 1. Redistributions of source code must retain the above copyright
10817b0f26Scgd.\"    notice, this list of conditions and the following disclaimer.
11817b0f26Scgd.\" 2. Redistributions in binary form must reproduce the above copyright
12817b0f26Scgd.\"    notice, this list of conditions and the following disclaimer in the
13817b0f26Scgd.\"    documentation and/or other materials provided with the distribution.
14817b0f26Scgd.\" 3. All advertising materials mentioning features or use of this software
15817b0f26Scgd.\"    must display the following acknowledgement:
16817b0f26Scgd.\"      This product includes software developed by Christopher G. Demetriou.
171cd39537Spk.\" 4. The name of the author may not be used to endorse or promote products
18817b0f26Scgd.\"    derived from this software without specific prior written permission
19817b0f26Scgd.\"
20817b0f26Scgd.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
21817b0f26Scgd.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
22817b0f26Scgd.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
23817b0f26Scgd.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
24817b0f26Scgd.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
25817b0f26Scgd.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26817b0f26Scgd.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27817b0f26Scgd.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28817b0f26Scgd.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29817b0f26Scgd.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30817b0f26Scgd.\"
312d1f1d1dSchristos.Dd January 24, 2008
32817b0f26Scgd.Dt YPWHICH 1
33817b0f26Scgd.Os
34817b0f26Scgd.Sh NAME
35817b0f26Scgd.Nm ypwhich
3663f6912bSthorpej.Nd return hostname of NIS server of map master
37817b0f26Scgd.Sh SYNOPSIS
38bf76d519Slukem.Nm
392d1f1d1dSchristos.Op Fl T
40bd7419a0Swiz.Op Fl d Ar domain
41*205b6ccbSwiz.Op Oo Fl h Oc Ar host
42990562bfSwiz.Nm
43bd7419a0Swiz.Op Fl fTt
443eff4309Slukem.Op Fl d Ar domain
453eff4309Slukem.Op Fl h Ar host
463eff4309Slukem.Fl m Op Ar mname
47990562bfSwiz.Nm
48817b0f26Scgd.Fl x
49817b0f26Scgd.Sh DESCRIPTION
50bf76d519Slukem.Nm
51817b0f26Scgdtells which
5263f6912bSthorpej.Tn NIS
53817b0f26Scgdserver supplies
5463f6912bSthorpej.Tn NIS
55817b0f26Scgdservices to a client, or which is the master for a map.
56817b0f26ScgdIf invoked without arguments, it gives the
5763f6912bSthorpej.Tn NIS
58817b0f26Scgdserver for the local machine.
59817b0f26ScgdIf
60817b0f26Scgd.Ar host
61ee158802Swizis specified, that machine is queried to find out which
6263f6912bSthorpej.Tn NIS
63817b0f26Scgdserver it is using.
64817b0f26Scgd.Pp
65817b0f26ScgdThe options are as follows:
663eff4309Slukem.Bl -tag -width Fl
67817b0f26Scgd.It Fl d Ar domain
68817b0f26ScgdSpecify a domain other than the default domain.
693eff4309Slukem.It Fl f
703eff4309SlukemWhen used in conjunction with
713eff4309Slukem.Fl m ,
723eff4309Slukemforce
733eff4309Slukem.Nm
743eff4309Slukemto query
753eff4309Slukem.Ar host
763eff4309Slukemdirectly, without using the local copy of
773eff4309Slukem.Xr ypbind 8 .
78bd7419a0Swiz.It Fl h Ar host
79bd7419a0SwizSpecify a host other than localhost to query for information.
80817b0f26Scgd.It Fl m Op Ar mname
81817b0f26ScgdFind the master
8263f6912bSthorpej.Tn NIS
833eff4309Slukemserver for the named map.
843eff4309Slukem.Ar mname
85be8ae688Sgrantcan be a map name or nickname.
86be8ae688SgrantIf
87817b0f26Scgd.Ar mname
88ee158802Swizis omitted,
89bf76d519Slukem.Nm
90817b0f26Scgdwill produce a list of available maps.
91bd7419a0Swiz.It Fl T
92bd7419a0SwizUse TCP protocol instead of UDP.
93bd7419a0Swiz.It Fl t
94bd7419a0SwizInhibit translation of map nicknames
95bd7419a0Swizto their corresponding map names.
96817b0f26Scgd.It Fl x
97bd7419a0SwizDisplay the map nickname table, found in
98bd7419a0Swiz.Pa /var/yp/nicknames .
99bd7419a0SwizA built-in default translation table is used if
100bd7419a0Swiz.Pa /var/yp/nicknames
101e5962c58Schristosdoes not exist (see
102e5962c58Schristos.Xr nicknames 5
103e5962c58Schristosfor details).
104817b0f26Scgd.El
105bd7419a0Swiz.Sh EXIT STATUS
106ad5a9cf0Slukem.Nm
107ad5a9cf0Slukemexits with a non-zero exit code if
108ad5a9cf0Slukem.Fl m
109ad5a9cf0Slukemis used, and there was a problem in determining the map's master.
110817b0f26Scgd.Sh SEE ALSO
11117595b34Sderaadt.Xr domainname 1 ,
11217595b34Sderaadt.Xr ypcat 1 ,
11317595b34Sderaadt.Xr ypmatch 1 ,
114e5962c58Schristos.Xr nicknames 5 ,
115c3b040d5Swiz.Xr nis 8 ,
1163eff4309Slukem.Xr ypbind 8 ,
11717595b34Sderaadt.Xr yppoll 8 ,
1183eff4309Slukem.Xr ypset 8
1192f83e3a2Swiz.Sh AUTHORS
1202f83e3a2Swiz.An Charles D. Cranor
121e5962c58Schristos.An Greywolf
122