xref: /dragonfly/usr.sbin/ypserv/ypinit.8 (revision f746689a)
1.\" Copyright (c) 1997
2.\" 	Bill Paul <wpaul@ctr.columbia.edu>.  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. 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 author nor the names of any co-contributors
16.\"    may be used to endorse or promote products derived from this software
17.\"   without specific prior written permission.
18.\"
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 THE VOICES IN HIS HEAD
23.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
29.\" THE POSSIBILITY OF SUCH DAMAGE.
30.\"
31.\" $FreeBSD: src/usr.sbin/ypserv/ypinit.8,v 1.17 2006/06/08 14:49:38 maxim Exp $
32.\" $DragonFly: src/usr.sbin/ypserv/ypinit.8,v 1.3 2007/05/13 22:25:42 swildner Exp $
33.\"
34.Dd November 10, 1997
35.Dt YPINIT 8
36.Os
37.Sh NAME
38.Nm ypinit
39.Nd build and install NIS databases
40.Sh SYNOPSIS
41.Nm
42.Fl m
43.Op Ar domainname
44.Nm
45.Fl s
46.Ar master_server
47.Op Ar domainname
48.Nm
49.Fl u
50.Op Ar domainname
51.Sh DESCRIPTION
52The
53.Nm
54utility is a script which sets up databases on a Network Information Service
55(NIS)
56master or slave server.
57.Pp
58On a master server,
59.Nm
60creates the
61.Pa /var/yp/$DOMAINNAME
62directory, the
63.Pa /var/yp/ypservers
64file, and calls
65.Pa /var/yp/Makefile
66to create and populate an initial set of NIS maps.
67The maps are
68created from local source files using the
69.Xr yp_mkdb 8
70utility.
71The utility will prompt the user for a list of servers
72that support the specified domain; this list is used to populate
73the ypservers map.
74.Pp
75On a slave server,
76.Nm
77creates the
78.Pa /var/yp/$DOMAINNAME ,
79populates it with copies of the NIS maps from the master.
80The maps
81are obtained from the master using the
82.Xr ypxfr 8
83utility.
84The
85.Nm
86utility obtains the list of maps to transfer in one of two ways: if
87the system is configured as an NIS client and is bound to the master
88server,
89.Nm
90is able to use the
91.Xr ypwhich 1
92utility to obtain a list of maps exported by the master server.
93If the system is not configured as a client of the NIS master,
94.Nm
95uses a hardcoded list of maps, some of which may or may not actually
96exist on the master.
97The system administrator can edit the
98.Nm
99script and
100modify the map list if necessary.
101Otherwise, individual maps can
102be transferred manually from the master using
103.Xr ypxfr 8 .
104.Sh OPTIONS
105The
106.Nm
107utility supports the following options:
108.Bl -tag -width indent
109.It Fl m Op Ar domainname
110Set up a master server.
111By default,
112.Nm
113sets up a server for
114the system default domain.
115The user can override this default by specifying
116.Ar domainname
117explicitly.
118Maps are constructed from scratch using local files as templates using
119the
120.Xr yp_mkdb 8
121utility.
122.It Fl s Ar master_server Op Ar domainname
123Set up a slave server using
124.Ar master_name
125as the master.
126Maps are copied from
127.Ar master_server
128to the slave using
129.Xr ypxfr 8 .
130By default,
131.Nm
132sets up a server for
133the system default domain.
134The user can override this default by specifying
135.Ar domainname
136explicitly.
137.It Fl u Op Ar domainname
138Update the ypservers map on the master server.
139When a new slave
140server is added to a domain, its hostname must be added to the
141ypservers map so that
142.Xr yppush 8
143can propagate updates on the master to all of the slaves.
144.El
145.Sh FILES
146.Bl -tag -width /var/yp/master.passwd -compact
147.It Pa /etc/bootparams
148Bootparams source file
149.It Pa /etc/ethers
150Ethers data source file
151.It Pa /etc/group
152Group source file
153.It Pa /etc/hosts
154Hostname/IP address source file
155.It Pa /etc/netid
156RPC netid source file
157.It Pa /etc/networks
158Networks source file
159.It Pa /etc/protocols
160Protocols source file
161.It Pa /etc/publickey
162RPC public key/secret key source file
163.It Pa /etc/services
164Services data source file
165.It Pa /etc/shells
166Shells source file
167.It Pa /var/yp/master.passwd
168Passwd database source file
169.It Pa /var/yp/netgroup
170Netgroup data source file
171.It Pa /var/yp/ypservers
172Ypservers source file (generated by
173.Nm )
174.El
175.Sh SEE ALSO
176.Xr mknetid 8 ,
177.Xr revnetgroup 8 ,
178.Xr yp 8 ,
179.Xr yp_mkdb 8 ,
180.Xr yppush 8 ,
181.Xr ypserv 8 ,
182.Xr ypxfr 8
183.Sh HISTORY
184This version of
185.Nm
186is based on the
187.Nm
188script in
189.Ox .
190It first appeared in
191.Fx 3.0 .
192.Sh AUTHORS
193.An -nosplit
194The original script was written by
195.An Mats O Jansson Aq moj@stacken.kth.se .
196It was modified for
197.Fx
198by
199.An Bill Paul Aq wpaul@ctr.columbia.edu .
200