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.
|
|
|
|
.\"
|
1998-08-31 16:41:09 +00:00
|
|
|
.\" $Id: ypinit.8,v 1.3 1998/03/23 08:31:04 charnier Exp $
|
1997-11-10 22:17:13 +00:00
|
|
|
.\"
|
|
|
|
.Dd November 10, 1997
|
1997-11-16 03:49:12 +00:00
|
|
|
.Dt YPINIT 8
|
1997-11-10 22:17:13 +00:00
|
|
|
.Os FreeBSD 3.0
|
|
|
|
.Sh NAME
|
|
|
|
.Nm ypinit
|
|
|
|
.Nd build and install NIS databases
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm ypinit
|
|
|
|
.Fl m
|
|
|
|
.Op Ar domainname
|
|
|
|
.Nm ypinit
|
|
|
|
.Fl s
|
|
|
|
.Ar master_server
|
|
|
|
.Op Ar domainname
|
|
|
|
.Nm ypinit
|
|
|
|
.Fl u
|
|
|
|
.Op Ar domainname
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
script sets up databases on a Network Information Service (NIS)
|
|
|
|
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
|
|
|
|
to create and populate an initial set of NIS maps. The maps are
|
|
|
|
created from local source files using the
|
|
|
|
.Xr yp_mkdb 8
|
|
|
|
command. The script will prompt the user for a list of servers
|
|
|
|
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 ,
|
1997-11-10 22:17:13 +00:00
|
|
|
populates it with copies of the NIS maps from the master. The maps
|
|
|
|
are obtained from the master using the
|
|
|
|
.Xr ypxfr 8
|
|
|
|
command. The
|
|
|
|
.Nm
|
|
|
|
script obtains the list of maps to transfer in one of two ways: if
|
|
|
|
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
|
1997-11-10 22:17:13 +00:00
|
|
|
command to obtain a list of maps exported by the master server.
|
|
|
|
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
|
|
|
|
exist on the master. The system administrator can edit the script and
|
|
|
|
modify the map list if necessary. Otherwise, indivudual maps can
|
|
|
|
be transfered manually from the master using
|
|
|
|
.Xr ypxfr 8 .
|
|
|
|
.Sh OPTIONS
|
1997-11-16 03:49:12 +00:00
|
|
|
.Nm Ypinit
|
1997-11-10 22:17:13 +00:00
|
|
|
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
|
|
|
|
Set up a master server. By default, the script sets up a server for
|
|
|
|
the system default domain. The user can override this default by specifying
|
|
|
|
.Ar domainname
|
|
|
|
explicitly.
|
|
|
|
Maps are constructed from scratch using local files as templates using
|
|
|
|
the
|
|
|
|
.Xr yp_mkdb 8
|
|
|
|
command.
|
|
|
|
.It Fl s Ar master_server Op Ar domainname
|
|
|
|
Set up a slave server using
|
|
|
|
.Ar master_name
|
|
|
|
as the master. Maps are copied from
|
|
|
|
.Ar master_server
|
|
|
|
to the slave using
|
|
|
|
.Xr ypxfr 8 .
|
|
|
|
By default, the script sets up a server for
|
|
|
|
the system default domain. The user can override this default by specifying
|
|
|
|
.Ar domainname
|
|
|
|
explicitly.
|
|
|
|
.It Fl u Op Ar domainname
|
|
|
|
Update the ypservers map on the master server. When a new slave
|
|
|
|
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.
|
|
|
|
.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
|
1997-11-16 03:49:12 +00:00
|
|
|
.Nm Ns )
|
1997-11-10 22:17:13 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
1998-08-31 16:41:09 +00:00
|
|
|
.Xr yp 4 ,
|
1997-11-10 22:17:13 +00:00
|
|
|
.Xr mknetid 8 ,
|
|
|
|
.Xr revnetgroup 8 ,
|
|
|
|
.Xr yp_mkdb 8 ,
|
|
|
|
.Xr yppush 8 ,
|
|
|
|
.Xr ypserv 8 ,
|
|
|
|
.Xr ypxfr 8
|
|
|
|
.Sh HISTORY
|
|
|
|
This version of
|
|
|
|
.Nm
|
|
|
|
is based on the
|
|
|
|
.Nm
|
1997-11-16 03:49:12 +00:00
|
|
|
script in
|
|
|
|
.Bx Open .
|
|
|
|
It first appeared in
|
|
|
|
.Bx Free
|
|
|
|
in
|
1997-11-10 22:17:13 +00:00
|
|
|
.Fx 3.0 .
|
1998-03-23 08:31:20 +00:00
|
|
|
.Sh AUTHORS
|
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
|
|
|
|
.Bx Free
|
|
|
|
by
|
1997-11-10 22:17:13 +00:00
|
|
|
.An Bill Paul Aq wpaul@ctr.columbia.edu .
|