1.\" $NetBSD: ypbind.8,v 1.14 2002/02/08 01:38:58 ross Exp $ 2.\" 3.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jason R. Thorpe. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the NetBSD 20.\" Foundation, Inc. and its contributors. 21.\" 4. Neither the name of The NetBSD Foundation nor the names of its 22.\" contributors may be used to endorse or promote products derived 23.\" from this software without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35.\" POSSIBILITY OF SUCH DAMAGE. 36.\" 37.Dd July 7, 1997 38.Dt YPBIND 8 39.Os 40.Sh NAME 41.Nm ypbind 42.Nd create and maintain a binding to a YP server 43.Sh SYNOPSIS 44.Nm 45.Op Fl broadcast 46.Op Fl insecure 47.Op Fl ypset 48.Op Fl ypsetme 49.Sh DESCRIPTION 50.Nm 51finds the server for a particular 52.Tn YP 53domain and stores information about it 54in a 55.Dq binding file . 56This binding information includes the IP address of the server associated with 57that particular domain and which port the server is using. This information 58is stored in the directory 59.Pa /var/yp/binding 60in a file named with the convention 61.Pa \*[Lt]domain\*[Gt].version , 62where 63.Aq domain 64is the relevant domain. 65The 66.Tn YP 67system only supplies information on version 2. 68.Pp 69If 70.Nm 71is started without the 72.Fl broadcast 73option, 74.Nm 75steps through the list of 76.Tn YP 77servers specified in 78.Pa /var/yp/binding/\*[Lt]domain\*[Gt].ypservers 79and contacts each in turn attempting to bind to that server. 80It is strongly recommended that these hosts are in the local 81hosts file, and that hosts are looked up in local files before 82the 83.Tn YP 84hosts map. 85.Pp 86If 87.Nm 88is started with the 89.Fl broadcast 90option, or if 91.Pa /var/yp/binding/\*[Lt]domain\*[Gt].ypservers 92does not exist, 93.Nm 94broadcasts to find a process willing to serve maps for the 95client's domain. 96.Pp 97Once a binding is established, 98.Nm 99maintains this binding by periodically communicating with the server to which 100it is bound. 101If the binding is somehow lost, e.g by server reboot, 102.Nm 103marks the domain as unbound and attempts to re-establish the binding. 104When the binding is once again successful, 105.Nm 106marks the domain as bound and resumes its periodic check. 107.Pp 108The options are as follows: 109.Bl -tag -width "-broadcast" 110.It Fl broadcast 111sends a broadcast requesting a 112.Tn YP 113server to which to bind. 114.It Fl insecure 115do not require that the server is running on a reserved port. 116This may be necessary when connecting to 117.Tn SunOS 3.x 118or 119.Tn ULTRIX 120.Tn YP 121servers. 122.It Fl ypset 123.Xr ypset 8 124may be used to change the server to which a domain is bound. 125.It Fl ypsetme 126.Xr ypset 8 127may be used only from this machine to change the server 128to which a domain is bound. 129.El 130.Pp 131The 132.Fl broadcast 133.Fl ypset , 134and 135.Fl ypsetme , 136options are inherently insecure and should be avoided. 137.Sh FILES 138.Pa /var/yp/binding/\*[Lt]domain\*[Gt].version 139- binding file for \*[Lt]domain\*[Gt]. 140.Pa /var/yp/binding/\*[Lt]domain\*[Gt].ypservers 141- explicit list of servers to bind to for \*[Lt]domain\*[Gt]. 142.Sh DIAGNOSTICS 143Messages are send to syslog daemon using facility LOG_DAEMON. 144.Sh SEE ALSO 145.Xr domainname 1 , 146.Xr ypcat 1 , 147.Xr ypmatch 1 , 148.Xr ypwhich 1 , 149.Xr yp 8 , 150.Xr yppoll 8 , 151.Xr ypset 8 152.Sh AUTHORS 153This version of 154.Nm 155was originally implemented by Theo de Raadt. The ypservers support was 156implemented by Luke Mewburn. 157