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