1995-12-25 03:07:13 +00:00
|
|
|
.\" Copyright (c) 1995
|
|
|
|
.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by Bill Paul.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
1999-08-28 00:22:10 +00:00
|
|
|
.\" $FreeBSD$
|
1995-12-25 03:07:13 +00:00
|
|
|
.\"
|
|
|
|
.Dd February 5, 1995
|
|
|
|
.Dt YPXFR 8
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm ypxfr
|
|
|
|
.Nd "transfer NIS database from remote server to local host"
|
|
|
|
.Sh SYNOPSIS
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm /usr/libexec/ypxfr
|
1995-12-25 03:07:13 +00:00
|
|
|
.Op Fl f
|
|
|
|
.Op Fl c
|
|
|
|
.Op Fl d Ar target domain
|
|
|
|
.Op Fl h Ar source host
|
|
|
|
.Op Fl s Ar source domain
|
|
|
|
.Op Fl p Ar path
|
|
|
|
.Op Fl C Ar taskid program-number ipaddr port
|
|
|
|
.Ar mapname
|
|
|
|
.Sh DESCRIPTION
|
2002-07-06 19:19:48 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility copies an
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
|
|
|
database (or
|
1995-12-25 03:07:13 +00:00
|
|
|
.Pa map )
|
1997-12-08 07:49:56 +00:00
|
|
|
from one
|
|
|
|
.Tn NIS
|
|
|
|
server to another using
|
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
services.
|
|
|
|
In
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx ,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
is generally invoked by
|
|
|
|
.Xr ypserv 8
|
|
|
|
when it receives a map transfer request from
|
|
|
|
.Xr yppush 8 .
|
2002-07-06 19:19:48 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used primarily in environments where several
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
servers are in use in a single domain.
|
|
|
|
One server, the
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
|
|
|
master, maintains
|
|
|
|
the canonical copies of all
|
|
|
|
.Tn NIS
|
|
|
|
maps, and all the other servers,
|
|
|
|
the
|
|
|
|
.Tn NIS
|
|
|
|
slaves, copy new versions of the maps from the master whenever
|
2004-07-02 21:28:50 +00:00
|
|
|
any updates are made (i.e., when a user updates their password via
|
2001-01-16 09:15:57 +00:00
|
|
|
.Xr yppasswd 1 ) .
|
1995-12-25 03:07:13 +00:00
|
|
|
.Pp
|
|
|
|
When run,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
creates a temporary database file in
|
|
|
|
.Pa /var/yp/[domainmame] ,
|
|
|
|
and fills it with the contents of
|
|
|
|
.Ar mapname
|
|
|
|
as supplied by the specified
|
|
|
|
.Ar source host .
|
|
|
|
When the entire map has been transfered,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
deletes the original copy of
|
|
|
|
.Ar mapname
|
2004-07-02 21:28:50 +00:00
|
|
|
and moves the temporary copy into its place.
|
|
|
|
When the transfer is
|
1995-12-25 03:07:13 +00:00
|
|
|
complete,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
will attempt to send a 'clear current map' request to the local
|
|
|
|
.Xr ypserv 8
|
|
|
|
process to clear any possible references it may still have to the
|
|
|
|
stale map.
|
|
|
|
.Pp
|
|
|
|
Note that all files created by
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
2004-07-02 21:28:50 +00:00
|
|
|
are owner readable and writable only for security reasons.
|
|
|
|
Since the
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
|
|
|
maps and the directory in which they reside are normally owned by
|
2002-12-27 12:15:40 +00:00
|
|
|
root, this prevents non-privileged users from making unauthorized
|
1995-12-25 03:07:13 +00:00
|
|
|
modifications.
|
|
|
|
.Pp
|
1997-12-08 07:49:56 +00:00
|
|
|
In order to maintain consistency across all
|
|
|
|
.Tn NIS
|
|
|
|
servers,
|
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
can be run periodically in a
|
|
|
|
.Xr cron 8
|
2004-07-02 21:28:50 +00:00
|
|
|
job.
|
|
|
|
Maps which change infrequently
|
1995-12-25 03:07:13 +00:00
|
|
|
need only be updated once a day (preferably late at night when system
|
|
|
|
usage is lowest), whereas those that are subject to frequent changes
|
|
|
|
(such a
|
|
|
|
.Pa passwd.byname
|
|
|
|
and
|
|
|
|
.Pa passwd.byuid )
|
2004-07-02 21:28:50 +00:00
|
|
|
should be updated perhaps once every hour.
|
|
|
|
Using
|
1995-12-25 03:07:13 +00:00
|
|
|
.Xr cron 8
|
|
|
|
to automatically
|
1997-12-08 07:49:56 +00:00
|
|
|
update the
|
|
|
|
.Tn NIS
|
|
|
|
maps is not strictly mandatory since all updates should
|
1995-12-25 03:07:13 +00:00
|
|
|
be propagated by
|
|
|
|
.Xr yppush 8
|
|
|
|
when
|
|
|
|
.Pa /var/yp/Makefile
|
1997-12-08 07:49:56 +00:00
|
|
|
is run on the
|
|
|
|
.Tn NIS
|
|
|
|
master server, however it is good practice
|
|
|
|
on large networks where possible outages could cause
|
|
|
|
.Tn NIS
|
|
|
|
servers to fall out of sync with each other.
|
1995-12-25 03:07:13 +00:00
|
|
|
.Pp
|
|
|
|
When
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
2004-07-02 21:28:50 +00:00
|
|
|
is invoked without a controlling terminal, e.g.\& from inside
|
1995-12-25 03:07:13 +00:00
|
|
|
.Xr ypserv 8 ,
|
|
|
|
it logs all its output using the
|
|
|
|
.Xr syslog 3
|
|
|
|
facility.
|
1996-06-05 05:42:52 +00:00
|
|
|
.Sh NOTES
|
1997-12-08 07:49:56 +00:00
|
|
|
The
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx
|
1997-12-08 07:49:56 +00:00
|
|
|
version of
|
|
|
|
.Nm
|
1996-06-05 05:42:52 +00:00
|
|
|
has support for a special map transfer protocol which works in
|
1997-12-08 07:49:56 +00:00
|
|
|
conjunction with the
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx
|
1996-06-05 05:42:52 +00:00
|
|
|
.Xr rpc.ypxfrd 8
|
2004-07-02 21:28:50 +00:00
|
|
|
server.
|
|
|
|
This protocol allows it to transfer raw map database files from
|
1997-12-08 07:49:56 +00:00
|
|
|
the
|
|
|
|
.Tn NIS
|
|
|
|
master server and can be many times faster than the standard
|
|
|
|
transfer method, particularly for very large
|
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
maps.
|
|
|
|
The
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
2002-07-06 19:19:48 +00:00
|
|
|
utility will check to see if the
|
1996-06-05 05:42:52 +00:00
|
|
|
.Xr rpc.ypxfrd 8
|
1997-12-08 07:49:56 +00:00
|
|
|
server is registered on the
|
|
|
|
.Tn NIS
|
|
|
|
master server and attempt to use
|
2004-07-02 21:28:50 +00:00
|
|
|
it if it is present.
|
|
|
|
If it isn't it will fall back to the standard
|
1996-06-05 05:42:52 +00:00
|
|
|
transfer method, copying the map contents from
|
|
|
|
.Xr ypserv 8
|
|
|
|
and creating new maps instead.
|
|
|
|
.Pp
|
1997-12-08 07:49:56 +00:00
|
|
|
Note that while the
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx
|
1997-12-08 07:49:56 +00:00
|
|
|
ypxfrd protocol is conceptually similar
|
|
|
|
to the SunOS ypxfrd protocol,
|
2000-01-23 02:18:19 +00:00
|
|
|
the
|
|
|
|
.Fx
|
1997-12-08 07:49:56 +00:00
|
|
|
protocol is not compatible with
|
|
|
|
Sun's, therefore it will not work with Sun's ypxfrd server.
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx
|
1997-12-08 07:49:56 +00:00
|
|
|
slave systems can still transfer maps from any
|
2000-11-14 11:20:58 +00:00
|
|
|
.No non- Ns Fx
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
|
|
|
server,
|
1996-06-05 05:42:52 +00:00
|
|
|
however they will only be able to take advantage of the faster protocol
|
1997-12-08 07:49:56 +00:00
|
|
|
if the master server is also running
|
2000-01-23 02:18:19 +00:00
|
|
|
.Fx .
|
1995-12-25 03:07:13 +00:00
|
|
|
.Sh OPTIONS
|
|
|
|
The following options and flags are supported by
|
2000-11-20 14:42:24 +00:00
|
|
|
.Nm :
|
1997-12-08 07:49:56 +00:00
|
|
|
.Bl -tag -width indent
|
1995-12-25 03:07:13 +00:00
|
|
|
.It Fl f
|
2004-07-02 21:28:50 +00:00
|
|
|
Force a map transfer.
|
|
|
|
Normally,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
|
|
|
will not transfer a map if it determines that the
|
|
|
|
.Tn NIS
|
|
|
|
master's copy
|
1995-12-25 03:07:13 +00:00
|
|
|
is not newer than the existing copy already on the local host: the
|
|
|
|
.Fl f
|
|
|
|
flag forces a transfer regardless of which server's version is more recent.
|
|
|
|
.It Fl c
|
|
|
|
Do not send a 'clear current map' request to the
|
|
|
|
.Xr ypserv 8
|
2004-07-02 21:28:50 +00:00
|
|
|
process running on the local host.
|
|
|
|
This flag is normally used when
|
1995-12-25 03:07:13 +00:00
|
|
|
invoking
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
manually on a machine that is not yet running
|
|
|
|
.Xr ypserv 8 .
|
1997-12-08 07:49:56 +00:00
|
|
|
Without this flag, failure to contact the local
|
|
|
|
.Tn NIS
|
|
|
|
server will cause
|
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
to abort the transfer.
|
|
|
|
.It Fl d Ar target domain
|
1997-12-08 07:49:56 +00:00
|
|
|
Specify a target domain other than the current
|
|
|
|
.Tn NIS
|
|
|
|
domain.
|
1995-12-25 03:07:13 +00:00
|
|
|
.It Fl h Ar source host
|
1997-12-08 07:49:56 +00:00
|
|
|
Specify the name of the host from which to copy the
|
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
maps.
|
|
|
|
This option
|
1995-12-25 03:07:13 +00:00
|
|
|
is used to insure that
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
|
|
|
only copies maps from the
|
|
|
|
.Tn NIS
|
|
|
|
master server.
|
1995-12-25 03:07:13 +00:00
|
|
|
.It Fl s Ar source domain
|
|
|
|
Specify the domain from which to transfer a map, in the event that
|
1997-12-08 07:49:56 +00:00
|
|
|
the transfer is being done across two different
|
|
|
|
.Tn NIS
|
|
|
|
domains.
|
1995-12-25 03:07:13 +00:00
|
|
|
.It Fl p Ar path
|
1997-12-08 07:49:56 +00:00
|
|
|
Specify the top level directory containing the
|
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
maps.
|
|
|
|
By
|
1995-12-25 03:07:13 +00:00
|
|
|
default, this path is
|
|
|
|
.Pa /var/yp .
|
|
|
|
The
|
|
|
|
.Fl p
|
|
|
|
flag allows you to specify an alternate path should you wish to
|
1997-12-08 07:49:56 +00:00
|
|
|
store your
|
|
|
|
.Tn NIS
|
2004-07-02 21:28:50 +00:00
|
|
|
maps in a different part of the file system.
|
|
|
|
The
|
1997-12-08 07:49:56 +00:00
|
|
|
.Tn NIS
|
|
|
|
server,
|
1995-12-25 03:07:13 +00:00
|
|
|
.Xr ypserv 8 ,
|
|
|
|
passes this flag to
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
if it too has been told to use an alternate path.
|
|
|
|
.It Fl C Ar taskid program-number ipaddr port
|
|
|
|
These options are used only when
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
is invoked by
|
|
|
|
.Xr ypserv 8
|
|
|
|
in response to a map transfer request initiated by
|
|
|
|
.Xr yppush 8 .
|
|
|
|
In this instance,
|
1997-12-08 07:49:56 +00:00
|
|
|
.Nm
|
1995-12-25 03:07:13 +00:00
|
|
|
needs to 'callback' to the
|
|
|
|
.Xr yppush 8
|
|
|
|
process and interact with it, so
|
|
|
|
.Xr yppush 8
|
|
|
|
passes to it an IP address
|
|
|
|
.Ar ipaddr ,
|
|
|
|
port number
|
|
|
|
.Ar port ,
|
|
|
|
registered program number
|
|
|
|
.Ar program-number
|
|
|
|
and a transaction ID
|
|
|
|
.Ar taskid
|
|
|
|
that it can use to contact the waiting
|
|
|
|
.Xr yppush 8
|
|
|
|
process on the master server.
|
|
|
|
.It Ar mapname
|
|
|
|
The name of the map to transfer.
|
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width Pa -compact
|
|
|
|
.It Pa /var/yp/[domainname]/[maps]
|
1997-12-08 07:49:56 +00:00
|
|
|
The
|
|
|
|
.Tn NIS
|
|
|
|
maps for a particular
|
|
|
|
.Tn NIS
|
|
|
|
domain.
|
1995-12-25 03:07:13 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2002-01-14 16:59:03 +00:00
|
|
|
.Xr yp 8 ,
|
1997-01-13 00:25:51 +00:00
|
|
|
.Xr yppush 8 ,
|
|
|
|
.Xr ypserv 8
|
1998-03-19 07:37:43 +00:00
|
|
|
.Sh AUTHORS
|
1997-12-08 07:49:56 +00:00
|
|
|
.An Bill Paul Aq wpaul@ctr.columbia.edu
|