xref: /openbsd-src/usr.sbin/ypbind/ypbind.8 (revision 8b1c418282f7aee7eff7ad6bbb94769b7cda2a0a)
1*8b1c4182Sschwarze.\"	$OpenBSD: ypbind.8,v 1.26 2018/04/26 12:53:09 schwarze Exp $
2608f9123Sniklas.\"	$NetBSD: ypbind.8,v 1.2 1996/02/28 01:21:00 thorpej Exp $
3df930be7Sderaadt.\"
4608f9123Sniklas.\" Copyright (c) 1996 The NetBSD Foundation, Inc.
5df930be7Sderaadt.\" All rights reserved.
6df930be7Sderaadt.\"
7608f9123Sniklas.\" This code is derived from software contributed to The NetBSD Foundation
8608f9123Sniklas.\" by Jason R. Thorpe.
9608f9123Sniklas.\"
10df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without
11df930be7Sderaadt.\" modification, are permitted provided that the following conditions
12df930be7Sderaadt.\" are met:
13df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright
14df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer.
15df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright
16df930be7Sderaadt.\"    notice, this list of conditions and the following disclaimer in the
17df930be7Sderaadt.\"    documentation and/or other materials provided with the distribution.
18df930be7Sderaadt.\"
19608f9123Sniklas.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20608f9123Sniklas.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21608f9123Sniklas.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22608f9123Sniklas.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
23608f9123Sniklas.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24608f9123Sniklas.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25608f9123Sniklas.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26608f9123Sniklas.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27608f9123Sniklas.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28608f9123Sniklas.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29608f9123Sniklas.\" POSSIBILITY OF SUCH DAMAGE.
30df930be7Sderaadt.\"
31*8b1c4182Sschwarze.Dd $Mdocdate: April 26 2018 $
32df930be7Sderaadt.Dt YPBIND 8
33df930be7Sderaadt.Os
34df930be7Sderaadt.Sh NAME
35df930be7Sderaadt.Nm ypbind
36df930be7Sderaadt.Nd create and maintain a binding to a YP server
37df930be7Sderaadt.Sh SYNOPSIS
387349792aSaaron.Nm ypbind
39c25d71fcSjmc.Op Fl insecure
40df930be7Sderaadt.Op Fl ypset
41df930be7Sderaadt.Op Fl ypsetme
42df930be7Sderaadt.Sh DESCRIPTION
43460a7e67Sderaadt.Nm
44df930be7Sderaadtfinds the server for a particular YP domain and stores information about it
45df930be7Sderaadtin a
46f885a527Saaron.Dq binding file .
47df930be7SderaadtThis binding information includes the IP address of the server associated with
48cdbdb68aSaaronthat particular domain and which port the server is using.
49cdbdb68aSaaronThis information is stored in the directory
50df930be7Sderaadt.Pa /var/yp/binding
51df930be7Sderaadtin a file named with the convention
52460a7e67Sderaadt.Pa DOMAINNAME.version .
53df930be7Sderaadt(The YP system only supplies information on version 2.)
54df930be7Sderaadt.Pp
55df930be7SderaadtWhen
56460a7e67Sderaadt.Nm
57460a7e67Sderaadtstarts the primary domain (or gets the first request for a new domain),
58460a7e67Sderaadtit checks if a file for the domain in question exists in the directory
59460a7e67Sderaadt.Pa /etc/yp/
60dc71b27eSaaron(i.e.,
61dc71b27eSaaron.Pa /etc/yp/DOMAINNAME ) .
62460a7e67SderaadtIf such a file exists, it will list the hosts which
63460a7e67Sderaadt.Nm
644feec33dSaaronshould restrict its server search to.
65460a7e67SderaadtOtherwise,
66460a7e67Sderaadt.Nm
67460a7e67Sderaadtassumes it will need to use broadcasts to find a valid server.
68460a7e67SderaadtUsing either of these techniques,
69460a7e67Sderaadt.Nm
70460a7e67Sderaadtwill search for a server willing to serve maps for the
71cdbdb68aSaaronclient's domain.
72cdbdb68aSaaronOnce a binding is established,
73460a7e67Sderaadt.Nm
74df930be7Sderaadtmaintains this binding by periodically communicating with the server to which
75cdbdb68aSaaronit is bound.
76cdbdb68aSaaronIf the binding is somehow lost, e.g by server reboot,
77460a7e67Sderaadt.Nm
78df930be7Sderaadtmarks the domain as unbound and attempts to re-establish the binding.
79df930be7SderaadtWhen the binding is once again successful,
80460a7e67Sderaadt.Nm
81df930be7Sderaadtmarks the domain as bound and resumes its periodic check.
82df930be7Sderaadt.Pp
83df930be7SderaadtThe options are as follows:
84f1ba3473Saaron.Bl -tag -width Ds
85c25d71fcSjmc.It Fl insecure
86c25d71fcSjmcPermit binding to a
87c25d71fcSjmc.Xr ypserv 8
88c25d71fcSjmcon a non-reserved port.
89c25d71fcSjmcThis is needed if receiving maps from SunOS 3.x or Ultrix.
90df930be7Sderaadt.It Fl ypset
91df930be7Sderaadt.Xr ypset 8
92df930be7Sderaadtmay be used to change the server to which a domain is bound.
93df930be7Sderaadt.It Fl ypsetme
94df930be7Sderaadt.Xr ypset 8
95df930be7Sderaadtmay be used only from this machine to change the server
96df930be7Sderaadtto which a domain is bound.
97df930be7Sderaadt.El
98df930be7Sderaadt.Pp
99df930be7SderaadtThe
100df930be7Sderaadt.Fl ypset
101df930be7Sderaadtand
102df930be7Sderaadt.Fl ypsetme
103df930be7Sderaadtoptions are dangerous and should be avoided.
104460a7e67SderaadtFor greatest security, the use of a server list in
105304a4322Sderaadt.Pa /etc/yp/DOMAINNAME
106460a7e67Sderaadtis recommended.
107304a4322SderaadtThe file should contain a list of valid YP server hostnames,
108304a4322Sderaadtwith one hostname per line.
109304a4322SderaadtThe comment character is #.
110df930be7Sderaadt.Sh FILES
111460a7e67Sderaadt.Pa /var/yp/binding/DOMAINNAME.version
112df930be7Sderaadt- binding file for domainname
113518730b9Sjmc.Pa /etc/yp/DOMAINNAME
114460a7e67Sderaadt- server list for this particular domain
115df930be7Sderaadt.Sh SEE ALSO
116df930be7Sderaadt.Xr domainname 1 ,
117df930be7Sderaadt.Xr ypcat 1 ,
118df930be7Sderaadt.Xr ypmatch 1 ,
119df930be7Sderaadt.Xr ypwhich 1 ,
120350bb3b8Salex.Xr yp 8 ,
121350bb3b8Salex.Xr yppoll 8 ,
122460a7e67Sderaadt.Xr ypserv 8 ,
123350bb3b8Salex.Xr ypset 8
124dc08b23eSderaadt.Pp
125dc08b23eSderaadtOnce
126dc08b23eSderaadt.Nm ypbind
127b5c831dbSderaadtis running, the following pages should be reviewed in order to see how to
128b5c831dbSderaadtenable YP support for each of the following maps:
129b5c831dbSderaadt.Xr ethers 5 ,
130dc08b23eSderaadt.Xr group 5 ,
131dc08b23eSderaadt.Xr hosts 5 ,
132b5c831dbSderaadt.Xr passwd 5 ,
1339d0b46bcSjmc.Xr resolv.conf 5
134b5667098Smpech.Sh AUTHORS
13527e95970Sschwarze.An Theo de Raadt
136