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