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