1.\" $OpenBSD: ypbind.8,v 1.23 2009/03/05 13:40:11 jmc Exp $ 2.\" $NetBSD: ypbind.8,v 1.2 1996/02/28 01:21:00 thorpej Exp $ 3.\" 4.\" Copyright (c) 1996 The NetBSD Foundation, Inc. 5.\" All rights reserved. 6.\" 7.\" This code is derived from software contributed to The NetBSD Foundation 8.\" by Jason R. Thorpe. 9.\" 10.\" Redistribution and use in source and binary forms, with or without 11.\" modification, are permitted provided that the following conditions 12.\" are met: 13.\" 1. Redistributions of source code must retain the above copyright 14.\" notice, this list of conditions and the following disclaimer. 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in the 17.\" documentation and/or other materials provided with the distribution. 18.\" 19.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE 23.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29.\" POSSIBILITY OF SUCH DAMAGE. 30.\" 31.Dd $Mdocdate: March 5 2009 $ 32.Dt YPBIND 8 33.Os 34.Sh NAME 35.Nm ypbind 36.Nd create and maintain a binding to a YP server 37.Sh SYNOPSIS 38.Nm ypbind 39.Op Fl insecure 40.Op Fl ypset 41.Op Fl ypsetme 42.Sh DESCRIPTION 43.Nm 44finds the server for a particular YP domain and stores information about it 45in a 46.Dq binding file . 47This binding information includes the IP address of the server associated with 48that particular domain and which port the server is using. 49This information is stored in the directory 50.Pa /var/yp/binding 51in a file named with the convention 52.Pa DOMAINNAME.version . 53(The YP system only supplies information on version 2.) 54.Pp 55When 56.Nm 57starts the primary domain (or gets the first request for a new domain), 58it checks if a file for the domain in question exists in the directory 59.Pa /etc/yp/ 60(i.e., 61.Pa /etc/yp/DOMAINNAME ) . 62If such a file exists, it will list the hosts which 63.Nm 64should restrict its server search to. 65Otherwise, 66.Nm 67assumes it will need to use broadcasts to find a valid server. 68Using either of these techniques, 69.Nm 70will search for a server willing to serve maps for the 71client's domain. 72Once a binding is established, 73.Nm 74maintains this binding by periodically communicating with the server to which 75it is bound. 76If the binding is somehow lost, e.g by server reboot, 77.Nm 78marks the domain as unbound and attempts to re-establish the binding. 79When the binding is once again successful, 80.Nm 81marks the domain as bound and resumes its periodic check. 82.Pp 83The options are as follows: 84.Bl -tag -width Ds 85.It Fl insecure 86Permit binding to a 87.Xr ypserv 8 88on a non-reserved port. 89This is needed if receiving maps from SunOS 3.x or Ultrix. 90.It Fl ypset 91.Xr ypset 8 92may be used to change the server to which a domain is bound. 93.It Fl ypsetme 94.Xr ypset 8 95may be used only from this machine to change the server 96to which a domain is bound. 97.El 98.Pp 99The 100.Fl ypset 101and 102.Fl ypsetme 103options are dangerous and should be avoided. 104For greatest security, the use of a server list in 105.Pa /etc/yp/DOMAINNAME 106is recommended. 107The file should contain a list of valid YP server hostnames, 108with one hostname per line. 109The comment character is #. 110.Pp 111If the directory 112.Pa /var/yp/binding 113exists, YP is started automatically at boot time by 114.Pa /etc/rc . 115.Sh FILES 116.Pa /var/yp/binding/DOMAINNAME.version 117- binding file for domainname 118.Pa /etc/yp/DOMAINNAME 119- server list for this particular domain 120.Sh SEE ALSO 121.Xr domainname 1 , 122.Xr ypcat 1 , 123.Xr ypmatch 1 , 124.Xr ypwhich 1 , 125.Xr yp 8 , 126.Xr yppoll 8 , 127.Xr ypserv 8 , 128.Xr ypset 8 129.Pp 130Once 131.Nm ypbind 132is running, the following pages should be reviewed in order to see how to 133enable YP support for each of the following maps: 134.Xr ethers 5 , 135.Xr group 5 , 136.Xr hosts 5 , 137.Xr networks 5 , 138.Xr passwd 5 , 139.Xr resolv.conf 5 140.Sh AUTHORS 141Theo de Raadt 142