1.\" $NetBSD: ypbind.8,v 1.22 2017/07/03 21:35:32 wiz 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.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd June 14, 2014 31.Dt YPBIND 8 32.Os 33.Sh NAME 34.Nm ypbind 35.Nd create and maintain a binding to a NIS server 36.Sh SYNOPSIS 37.Nm 38.Op Fl broadcast 39.Op Fl insecure 40.Op Fl ypset 41.Op Fl ypsetme 42.Sh DESCRIPTION 43.Nm 44finds the server for a particular 45.Tn NIS 46domain and stores information about it 47in a 48.Dq binding file . 49This binding information includes the IP address of the server associated with 50that particular domain and which port the server is using. 51This information is stored in the directory 52.Pa /var/yp/binding 53in a file named with the convention 54.Pa <domain>.version , 55where 56.Aq domain 57is the relevant domain. 58The 59.Tn NIS 60system only supplies information on version 2. 61.Pp 62If 63.Nm 64is started without the 65.Fl broadcast 66option, 67.Nm 68steps through the list of 69.Tn NIS 70servers specified in 71.Pa /var/yp/binding/<domain>.ypservers 72and contacts each in turn attempting to bind to that server. 73It is strongly recommended that these hosts are in the local 74hosts file, and that hosts are looked up in local files before 75the 76.Tn NIS 77hosts map. 78.Pp 79If 80.Nm 81is started with the 82.Fl broadcast 83option, or if 84.Pa /var/yp/binding/<domain>.ypservers 85does not exist, 86.Nm 87broadcasts to find a process willing to serve maps for the 88client's domain. 89.Pp 90Once a binding is established, 91.Nm 92maintains this binding by periodically communicating with the server to which 93it is bound. 94If the binding is somehow lost, e.g by server reboot, 95.Nm 96marks the domain as unbound and attempts to re-establish the binding. 97If a binding cannot be re-established within 60 seconds, 98.Nm 99backs off exponentially to trying only once per hour. 100.Pp 101The options are as follows: 102.Bl -tag -width "-broadcast" 103.It Fl broadcast 104sends a broadcast requesting a 105.Tn NIS 106server to which to bind. 107.It Fl insecure 108do not require that the server is running on a reserved port. 109This may be necessary when connecting to 110.Tn SunOS 3.x 111or 112.Tn ULTRIX 113.Tn NIS 114servers. 115.It Fl ypset 116.Xr ypset 8 117may be used from anywhere to change the server to which a domain is bound. 118.It Fl ypsetme 119.Xr ypset 8 120may be used only from this machine to change the server 121to which a domain is bound. 122.El 123.Pp 124The 125.Fl broadcast , 126.Fl ypset , 127and 128.Fl ypsetme 129options are inherently insecure and should be avoided. 130.Sh SIGNALS 131.Nm 132responds to the following signals: 133.Bl -tag -width TERM -compact 134.It Dv HUP 135causes 136.Nm 137to immediately retry any unbound domains that are currently in 138exponential backoff. 139Use this to resume immediately after a long network outage is 140resolved. 141.El 142.Sh FILES 143.Pa /var/yp/binding/<domain>.version 144- binding file for <domain>. 145.Pa /var/yp/binding/<domain>.ypservers 146- explicit list of servers to bind to for <domain>. 147.Sh DIAGNOSTICS 148Messages are sent to 149.Xr syslogd 8 150using the 151.Dv LOG_DAEMON 152facility. 153.Sh SEE ALSO 154.Xr domainname 1 , 155.Xr ypcat 1 , 156.Xr ypmatch 1 , 157.Xr ypwhich 1 , 158.Xr nis 8 , 159.Xr yppoll 8 , 160.Xr ypset 8 161.Sh AUTHORS 162.An -nosplit 163This version of 164.Nm 165was originally implemented by 166.An Theo de Raadt . 167The ypservers support was implemented by 168.An Luke Mewburn . 169