1.\" Copyright (c) 1991, 1993, 1995 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" $FreeBSD$ 33.\" 34.Dd April 9, 1995 35.Dt YPBIND 8 36.Os 37.Sh NAME 38.Nm ypbind 39.Nd "NIS domain binding daemon" 40.Sh SYNOPSIS 41.Nm 42.Op Fl ypset 43.Op Fl ypsetme 44.Op Fl s 45.Op Fl m 46.Op Fl S Ar domainname,server1,server2,... 47.Sh DESCRIPTION 48.Nm Ypbind 49is the process that maintains NIS binding information. 50At startup, 51it searches for an NIS server responsible for serving the system's 52default domain (as set by the 53.Xr domainname 1 54command) using network broadcasts. 55Once it receives a reply, 56it will store the address of the server and other 57information in a special file located in 58.Pa /var/yp/binding . 59The NIS routines in the standard C library can then use this file 60when processing NIS requests. 61There may be several such files 62since it is possible for an NIS client to be bound to more than 63one domain. 64.Pp 65After a binding has been established, 66.Nm 67will send DOMAIN_NONACK requests to the NIS server at one minute 68intervals. 69If it fails to receive a reply to one of these requests, 70.Nm 71assumes that the server is no longer running and resumes its network 72broadcasts until another binding is established. 73.Nm Ypbind 74will also log warning messages using the 75.Xr syslog 3 76facility each time it detects that a server has stopped responding, 77as well as when it has bound to a new server. 78.Pp 79The following options are available: 80.Bl -tag -width indent 81.It Fl ypset 82It is possible to force 83.Nm 84to bind to a particular NIS server host for a given domain by using the 85.Xr ypset 8 86command. 87However, 88.Nm 89refuses YPBINDPROC_SETDOM requests by default since it has no way of 90knowing exactly who is sending them. 91Using the 92.Fl ypset 93flag causes 94.Nm 95to accept YPBINDPROC_SETDOM requests from any host. 96This option should only 97be used for diagnostic purposes and only for limited periods since allowing 98arbitrary users to reset the binding of an NIS client poses a severe 99security risk. 100.It Fl ypsetme 101This is similar to the 102.Fl ypset 103flag, except that it only permits YPBINDPROC_SETDOM requests to be processed 104if they originated from the local host. 105.It Fl s 106Cause 107.Nm 108to run in secure mode: it will refuse to bind to any NIS server 109that is not running as root (i.e. that is not using privileged 110TCP ports). 111.It Fl S Ar domainname,server1,server2,server3,... 112Allow the system administrator to lock 113.Nm 114to a particular 115domain and group of NIS servers. 116Up to ten servers can be specified. 117There must not be any spaces between the commas in the domain/server 118specification. 119This option is used to insure that the system binds 120only to one domain and only to one of the specified servers, which 121is useful for systems that are both NIS servers and NIS 122clients: it provides a way to restrict what machines the system can 123bind to without the need for specifying the 124.Fl ypset 125or 126.Fl ypsetme 127options, which are often considered to be security holes. 128The specified 129servers must have valid entries in the local 130.Pa /etc/hosts 131file. IP addresses may be specified in place of hostnames. 132If 133.Nm 134can't make sense ouf of the arguments, it will ignore 135the 136.Fl S 137flag and continue running normally. 138.Pp 139Note that 140.Nm 141will consider the domainname specified with the 142.Fl S 143flag to be the system default domain. 144.It Fl m 145Cause 146.Nm 147to use a 'many-cast' rather than a broadcast for choosing a server 148from the restricted mode server list. 149In many-cast mode, 150.Nm 151will transmit directly to the YPPROC_DOMAIN_NONACK procedure of the 152servers specified in the restricted list and bind to the server that 153responds the fastest. 154This mode of operation is useful for NIS clients on remote subnets 155where no local NIS servers are available. 156The 157.Fl m 158flag can only be used in conjunction with the 159.Fl S 160flag above (if used without the 161.Fl S 162flag, it has no effect). 163.El 164.Sh NOTES 165The 166.Nm 167program will not make continuous attempts to keep secondary domains bound. 168If a server for a secondary domain fails to respond to a ping, 169.Nm 170will broadcast for a new server only once before giving up. 171If a 172client program attempts to reference the unbound domain, 173.Nm 174will try broadcasting again. 175By contrast, 176.Nm 177will automatically maintain a binding for the default domain whether 178client programs reference it ot not. 179.Sh FILES 180.Bl -tag -width /etc/rc.conf -compact 181.It Pa /var/yp/binding/[domainname].[version] 182the files used to hold binding information for each NIS domain 183.It Pa /etc/rc.conf 184system configuration file where the system default domain and 185ypbind startup options are specified 186.El 187.Sh SEE ALSO 188.Xr domainname 1 , 189.Xr syslog 3 , 190.Xr yp 4 , 191.Xr ypserv 8 , 192.Xr ypset 8 193.Sh AUTHORS 194.An Theo de Raadt Aq deraadt@fsa.ca 195