2 .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
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 Bill Paul.
15 .\" 4. Neither the name of the University nor the names of its contributors
16 .\" may be used to endorse or promote products derived from this software
17 .\" without specific prior written permission.
19 .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" $FreeBSD: src/libexec/ypxfr/ypxfr.8,v 1.10.2.4 2002/12/29 16:35:37 schweikh Exp $
32 .\" $DragonFly: src/libexec/ypxfr/ypxfr.8,v 1.4 2007/05/13 22:25:41 swildner Exp $
39 .Nd "transfer NIS database from remote server to local host"
41 .Nm /usr/libexec/ypxfr
44 .Op Fl d Ar target domain
45 .Op Fl h Ar source host
46 .Op Fl s Ar source domain
48 .Op Fl C Ar taskid program-number ipaddr port
58 server to another using
63 is generally invoked by
65 when it receives a map transfer request from
68 is used primarily in environments where several
70 servers are in use in a single domain. One server, the
73 the canonical copies of all
75 maps, and all the other servers,
78 slaves, copy new versions of the maps from the master whenever
79 any updates are made (i.e. when a user updates their password via
84 creates a temporary database file in
85 .Pa /var/yp/[domainmame] ,
86 and fills it with the contents of
88 as supplied by the specified
90 When the entire map has been transferred,
92 deletes the original copy of
94 and moves the temporary copy into its place. When the transfer is
97 will attempt to send a 'clear current map' request to the local
99 process to clear any possible references it may still have to the
102 Note that all files created by
104 are owner readable and writable only for security reasons. Since the
106 maps and the directory in which they reside are normally owned by
107 root, this prevents non-privileged users from making unauthorized
110 In order to maintain consistency across all
114 can be run periodically in a
116 job. Maps which change infrequently
117 need only be updated once a day (preferably late at night when system
118 usage is lowest), whereas those that are subject to frequent changes
123 should be updated perhaps once every hour. Using
128 maps is not strictly mandatory since all updates should
135 master server, however it is good practice
136 on large networks where possible outages could cause
138 servers to fall out of sync with each other.
142 is invoked without a controlling terminal, e.g. from inside
144 it logs all its output using the
152 has support for a special map transfer protocol which works in
156 server. This protocol allows it to transfer raw map database files from
159 master server and can be many times faster than the standard
160 transfer method, particularly for very large
164 command will check to see if the
166 server is registered on the
168 master server and attempt to use
169 it if it is present. If it isn't it will fall back to the standard
170 transfer method, copying the map contents from
172 and creating new maps instead.
176 ypxfrd protocol is conceptually similar
177 to the SunOS ypxfrd protocol,
180 protocol is not compatible with
181 Sun's, therefore it will not work with Sun's ypxfrd server.
183 slave systems can still transfer maps from any
184 .No non- Ns Dx Ns / Ns Fx
187 however they will only be able to take advantage of the faster protocol
188 if the master server is also running
191 The following options and flags are supported by
193 .Bl -tag -width indent
195 Force a map transfer. Normally,
197 will not transfer a map if it determines that the
200 is not newer than the existing copy already on the local host: the
202 flag forces a transfer regardless of which server's version is more recent.
204 Do not send a 'clear current map' request to the
206 process running on the local host. This flag is normally used when
209 manually on a machine that is not yet running
211 Without this flag, failure to contact the local
215 to abort the transfer.
216 .It Fl d Ar target domain
217 Specify a target domain other than the current
220 .It Fl h Ar source host
221 Specify the name of the host from which to copy the
224 is used to insure that
226 only copies maps from the
229 .It Fl s Ar source domain
230 Specify the domain from which to transfer a map, in the event that
231 the transfer is being done across two different
235 Specify the top level directory containing the
238 default, this path is
242 flag allows you to specify an alternate path should you wish to
245 maps in a different part of the filesystem. The
251 if it too has been told to use an alternate path.
252 .It Fl C Ar taskid program-number ipaddr port
253 These options are used only when
257 in response to a map transfer request initiated by
261 needs to 'callback' to the
263 process and interact with it, so
265 passes to it an IP address
269 registered program number
273 that it can use to contact the waiting
275 process on the master server.
277 The name of the map to transfer.
280 .Bl -tag -width Pa -compact
281 .It Pa /var/yp/[domainname]/[maps]
284 maps for a particular
293 .An Bill Paul Aq wpaul@ctr.columbia.edu