xref: /freebsd/usr.sbin/ypbind/ypbind.8 (revision 4cf49a43559ed9fdad601bdcccd2c55963008675)
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. At startup,
50it searches for an NIS server responsible for serving the system's
51default domain (as set by the
52.Xr domainname 1
53command) using network broadcasts.
54Once it receives a reply,
55it will store the address of the server and other
56information in a special file located in
57.Pa /var/yp/binding .
58The NIS routines in the standard C library can then use this file
59when processing NIS requests. There may be several such files
60since it is possible for an NIS client to be bound to more than
61one domain.
62.Pp
63After a binding has been established,
64.Nm
65will send DOMAIN_NONACK requests to the NIS server at one minute
66intervals. If it fails to receive a reply to one of these requests,
67.Nm
68assumes that the server is no longer running and resumes its network
69broadcasts until another binding is established.
70.Nm Ypbind
71will also log warning messages using the
72.Xr syslog 3
73facility each time it detects that a server has stopped responding,
74as well as when it has bound to a new server.
75.Sh OPTIONS
76The following options are supported by
77.Nm Ns :
78.Bl -tag -width indent
79.It Fl ypset
80It is possible to force
81.Nm
82to bind to a particular NIS server host for a given domain by using the
83.Xr ypset 8
84command. However,
85.Nm
86refuses YPBINDPROC_SETDOM requests by default since it has no way of
87knowing exactly who is sending them. Using the
88.Fl ypset
89flag causes
90.Nm
91to accept YPBINDPROC_SETDOM requests from any host. This option should only
92be used for diagnostic purposes and only for limited periods since allowing
93arbitrary users to reset the binding of an NIS client poses a severe
94security risk.
95.It Fl ypsetme
96This is similar to the
97.Fl ypset
98flag, except that it only permits YPBINDPROC_SETDOM requests to be processed
99if they originated from the local host.
100.It Fl s
101Cause
102.Nm
103to run in secure mode: it will refuse to bind to any NIS server
104that is not running as root (i.e. that is not using privileged
105TCP ports).
106.It Fl S Ar domainname,server1,server2,server3,...
107Allow the system administrator to lock
108.Nm
109to a particular
110domain and group of NIS servers. Up to ten servers can be specified.
111There must not be any spaces between the commas in the domain/server
112specification. This option is used to insure that the system binds
113only to one domain and only to one of the specified servers, which
114is useful for systems that are both NIS servers and NIS
115clients: it provides a way to restrict what machines the system can
116bind to without the need for specifying the
117.Fl ypset
118or
119.Fl ypsetme
120options, which are often considered to be security holes. The specified
121servers must have valid entries in the local
122.Pa /etc/hosts
123file. IP addresses may be specified in place of hostnames. If
124.Nm
125can't make sense ouf of the arguments, it will ignore
126the
127.Fl S
128flag and continue running normally.
129.Pp
130Note that
131.Nm
132will consider the domainname specified with the
133.Fl S
134flag to be the system default domain.
135.It Fl m
136Cause
137.Nm
138to use a 'many-cast' rather than a broadcast for choosing a server
139from the restricted mode server list. In many-cast mode,
140.Nm
141will transmit directly to the YPPROC_DOMAIN_NONACK procedure of the
142servers specified in the restricted list and bind to the server that
143responds the fastest.
144This mode of operation is useful for NIS clients on remote subnets
145where no local NIS servers are available. The
146.Fl m
147flag can only be used in conjunction with the
148.Fl S
149flag above (if used without the
150.Fl S
151flag, it has no effect).
152.El
153.Sh NOTES
154The
155.Nm
156program will not make continuous attempts to keep secondary domains bound.
157If a server for a secondary domain fails to respond to a ping,
158.Nm
159will broadcast for a new server only once before giving up. If a
160client program attempts to reference the unbound domain,
161.Nm
162will try broadcasting again. By contrast,
163.Nm
164will automatically maintain a binding for the default domain whether
165client programs reference it ot not.
166.Sh FILES
167.Bl -tag -width /etc/rc.conf -compact
168.It Pa /var/yp/binding/[domainname].[version]
169the files used to hold binding information for each NIS domain
170.It Pa /etc/rc.conf
171system configuration file where the system default domain and
172ypbind startup options are specified
173.El
174.Sh SEE ALSO
175.Xr domainname 1 ,
176.Xr syslog 3 ,
177.Xr yp 4 ,
178.Xr ypserv 8 ,
179.Xr ypset 8
180.Sh AUTHORS
181.An Theo de Raadt Aq deraadt@fsa.ca
182