1997-11-10 22:17:13 +00:00
|
|
|
.\" Copyright (c) 1997
|
|
|
|
.\" 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 author nor the names of any co-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 THE VOICES IN HIS HEAD
|
|
|
|
.\" 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 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1997-11-10 22:17:13 +00:00
|
|
|
.\"
|
|
|
|
.Dd November 10, 1997
|
1997-11-16 03:49:12 +00:00
|
|
|
.Dt YPINIT 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1997-11-10 22:17:13 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm ypinit
|
|
|
|
.Nd build and install NIS databases
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1997-11-10 22:17:13 +00:00
|
|
|
.Fl m
|
|
|
|
.Op Ar domainname
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1997-11-10 22:17:13 +00:00
|
|
|
.Fl s
|
|
|
|
.Ar master_server
|
|
|
|
.Op Ar domainname
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
1997-11-10 22:17:13 +00:00
|
|
|
.Fl u
|
|
|
|
.Op Ar domainname
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility is a script which sets up databases on a Network Information Service
|
|
|
|
(NIS)
|
1997-11-10 22:17:13 +00:00
|
|
|
master or slave server.
|
|
|
|
.Pp
|
|
|
|
On a master server,
|
|
|
|
.Nm
|
|
|
|
creates the
|
|
|
|
.Pa /var/yp/$DOMAINNAME
|
|
|
|
directory, the
|
|
|
|
.Pa /var/yp/ypservers
|
|
|
|
file, and calls
|
|
|
|
.Pa /var/yp/Makefile
|
2000-03-01 14:09:25 +00:00
|
|
|
to create and populate an initial set of NIS maps.
|
|
|
|
The maps are
|
1997-11-10 22:17:13 +00:00
|
|
|
created from local source files using the
|
|
|
|
.Xr yp_mkdb 8
|
2002-07-14 14:47:15 +00:00
|
|
|
utility.
|
|
|
|
The utility will prompt the user for a list of servers
|
1997-11-10 22:17:13 +00:00
|
|
|
that support the specified domain; this list is used to populate
|
|
|
|
the ypservers map.
|
|
|
|
.Pp
|
|
|
|
On a slave server,
|
|
|
|
.Nm
|
|
|
|
creates the
|
1997-11-16 03:49:12 +00:00
|
|
|
.Pa /var/yp/$DOMAINNAME ,
|
2000-03-01 14:09:25 +00:00
|
|
|
populates it with copies of the NIS maps from the master.
|
|
|
|
The maps
|
1997-11-10 22:17:13 +00:00
|
|
|
are obtained from the master using the
|
|
|
|
.Xr ypxfr 8
|
2002-07-14 14:47:15 +00:00
|
|
|
utility.
|
2000-03-01 14:09:25 +00:00
|
|
|
The
|
1997-11-10 22:17:13 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility obtains the list of maps to transfer in one of two ways: if
|
1997-11-10 22:17:13 +00:00
|
|
|
the system is configured as an NIS client and is bound to the master
|
|
|
|
server,
|
|
|
|
.Nm
|
|
|
|
is able to use the
|
1997-11-16 03:49:12 +00:00
|
|
|
.Xr ypwhich 1
|
2002-07-14 14:47:15 +00:00
|
|
|
utility to obtain a list of maps exported by the master server.
|
1997-11-10 22:17:13 +00:00
|
|
|
If the system is not configured as a client of the NIS master,
|
|
|
|
.Nm
|
|
|
|
uses a hardcoded list of maps, some of which may or may not actually
|
2000-03-01 14:09:25 +00:00
|
|
|
exist on the master.
|
2002-07-14 14:47:15 +00:00
|
|
|
The system administrator can edit the
|
|
|
|
.Nm
|
|
|
|
script and
|
2000-03-01 14:09:25 +00:00
|
|
|
modify the map list if necessary.
|
2002-07-14 14:47:15 +00:00
|
|
|
Otherwise, individual maps can
|
1997-11-10 22:17:13 +00:00
|
|
|
be transfered manually from the master using
|
|
|
|
.Xr ypxfr 8 .
|
|
|
|
.Sh OPTIONS
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility supports the following options:
|
1997-11-16 03:49:12 +00:00
|
|
|
.Bl -tag -width indent
|
1997-11-10 22:17:13 +00:00
|
|
|
.It Fl m Op Ar domainname
|
2000-03-01 14:09:25 +00:00
|
|
|
Set up a master server.
|
2002-07-14 14:47:15 +00:00
|
|
|
By default,
|
|
|
|
.Nm
|
|
|
|
sets up a server for
|
2000-03-01 14:09:25 +00:00
|
|
|
the system default domain.
|
|
|
|
The user can override this default by specifying
|
1997-11-10 22:17:13 +00:00
|
|
|
.Ar domainname
|
|
|
|
explicitly.
|
|
|
|
Maps are constructed from scratch using local files as templates using
|
|
|
|
the
|
|
|
|
.Xr yp_mkdb 8
|
2002-07-14 14:47:15 +00:00
|
|
|
utility.
|
1997-11-10 22:17:13 +00:00
|
|
|
.It Fl s Ar master_server Op Ar domainname
|
|
|
|
Set up a slave server using
|
|
|
|
.Ar master_name
|
2000-03-01 14:09:25 +00:00
|
|
|
as the master.
|
|
|
|
Maps are copied from
|
1997-11-10 22:17:13 +00:00
|
|
|
.Ar master_server
|
|
|
|
to the slave using
|
|
|
|
.Xr ypxfr 8 .
|
2002-07-14 14:47:15 +00:00
|
|
|
By default,
|
|
|
|
.Nm
|
|
|
|
sets up a server for
|
2000-03-01 14:09:25 +00:00
|
|
|
the system default domain.
|
|
|
|
The user can override this default by specifying
|
1997-11-10 22:17:13 +00:00
|
|
|
.Ar domainname
|
|
|
|
explicitly.
|
|
|
|
.It Fl u Op Ar domainname
|
2000-03-01 14:09:25 +00:00
|
|
|
Update the ypservers map on the master server.
|
|
|
|
When a new slave
|
1997-11-10 22:17:13 +00:00
|
|
|
server is added to a domain, its hostname must be added to the
|
|
|
|
ypservers map so that
|
|
|
|
.Xr yppush 8
|
|
|
|
can propagate updates on the master to all of the slaves.
|
2000-12-27 15:30:30 +00:00
|
|
|
.El
|
1997-11-10 22:17:13 +00:00
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width /var/yp/master.passwd -compact
|
|
|
|
.It Pa /etc/bootparams
|
|
|
|
Bootparams source file
|
|
|
|
.It Pa /etc/ethers
|
|
|
|
Ethers data source file
|
|
|
|
.It Pa /etc/group
|
|
|
|
Group source file
|
|
|
|
.It Pa /etc/hosts
|
|
|
|
Hostname/IP address source file
|
|
|
|
.It Pa /etc/netid
|
|
|
|
RPC netid source file
|
|
|
|
.It Pa /etc/networks
|
|
|
|
Networks source file
|
|
|
|
.It Pa /etc/protocols
|
|
|
|
Protocols source file
|
|
|
|
.It Pa /etc/publickey
|
|
|
|
RPC public key/secret key source file
|
|
|
|
.It Pa /etc/services
|
|
|
|
Services data source file
|
|
|
|
.It Pa /var/yp/master.passwd
|
|
|
|
Passwd database source file
|
|
|
|
.It Pa /var/yp/netgroup
|
|
|
|
Netgroup data source file
|
|
|
|
.It Pa /var/yp/ypservers
|
|
|
|
Ypservers source file (generated by
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm )
|
1997-11-10 22:17:13 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr mknetid 8 ,
|
|
|
|
.Xr revnetgroup 8 ,
|
2002-01-14 16:59:03 +00:00
|
|
|
.Xr yp 8 ,
|
2004-07-04 20:55:50 +00:00
|
|
|
.Xr yp_mkdb 8 ,
|
1997-11-10 22:17:13 +00:00
|
|
|
.Xr yppush 8 ,
|
|
|
|
.Xr ypserv 8 ,
|
2004-07-04 20:55:50 +00:00
|
|
|
.Xr ypxfr 8
|
1997-11-10 22:17:13 +00:00
|
|
|
.Sh HISTORY
|
|
|
|
This version of
|
|
|
|
.Nm
|
|
|
|
is based on the
|
|
|
|
.Nm
|
1997-11-16 03:49:12 +00:00
|
|
|
script in
|
2000-01-23 02:10:01 +00:00
|
|
|
.Ox .
|
1997-11-16 03:49:12 +00:00
|
|
|
It first appeared in
|
1997-11-10 22:17:13 +00:00
|
|
|
.Fx 3.0 .
|
1998-03-23 08:31:20 +00:00
|
|
|
.Sh AUTHORS
|
2000-11-22 09:35:58 +00:00
|
|
|
.An -nosplit
|
1997-11-10 22:17:13 +00:00
|
|
|
The original script was written by
|
|
|
|
.An Mats O Jansson Aq moj@stacken.kth.se .
|
1997-11-16 03:49:12 +00:00
|
|
|
It was modified for
|
2000-01-23 02:10:01 +00:00
|
|
|
.Fx
|
1997-11-16 03:49:12 +00:00
|
|
|
by
|
1997-11-10 22:17:13 +00:00
|
|
|
.An Bill Paul Aq wpaul@ctr.columbia.edu .
|