Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.sbin / ypserv / ypinit.8
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.7.2.6 2003/03/11 22:31:35 trhodes Exp $
32 .\" $DragonFly: src/usr.sbin/ypserv/ypinit.8,v 1.2 2003/06/17 04:30:05 dillon 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
52 The
53 .Nm
54 utility is a script which sets up databases on a Network Information Service
55 (NIS)
56 master or slave server.
57 .Pp
58 On a master server,
59 .Nm
60 creates the
61 .Pa /var/yp/$DOMAINNAME
62 directory, the
63 .Pa /var/yp/ypservers
64 file, and calls
65 .Pa /var/yp/Makefile
66 to create and populate an initial set of NIS maps.
67 The maps are
68 created from local source files using the
69 .Xr yp_mkdb 8
70 utility.
71 The utility will prompt the user for a list of servers
72 that support the specified domain; this list is used to populate
73 the ypservers map.
74 .Pp
75 On a slave server,
76 .Nm
77 creates the
78 .Pa /var/yp/$DOMAINNAME ,
79 populates it with copies of the NIS maps from the master.
80 The maps
81 are obtained from the master using the
82 .Xr ypxfr 8
83 utility.
84 The
85 .Nm
86 utility obtains the list of maps to transfer in one of two ways: if
87 the system is configured as an NIS client and is bound to the master
88 server,
89 .Nm
90 is able to use the
91 .Xr ypwhich 1
92 utility to obtain a list of maps exported by the master server.
93 If the system is not configured as a client of the NIS master,
94 .Nm
95 uses a hardcoded list of maps, some of which may or may not actually
96 exist on the master.
97 The system administrator can edit the
98 .Nm
99 script and
100 modify the map list if necessary.
101 Otherwise, individual maps can
102 be transfered manually from the master using
103 .Xr ypxfr 8 .
104 .Sh OPTIONS
105 The
106 .Nm
107 utility supports the following options:
108 .Bl -tag -width indent
109 .It Fl m Op Ar domainname
110 Set up a master server.
111 By default,
112 .Nm
113 sets up a server for
114 the system default domain.
115 The user can override this default by specifying
116 .Ar domainname
117 explicitly.
118 Maps are constructed from scratch using local files as templates using
119 the
120 .Xr yp_mkdb 8
121 utility.
122 .It Fl s Ar master_server Op Ar domainname
123 Set up a slave server using
124 .Ar master_name
125 as the master.
126 Maps are copied from
127 .Ar master_server
128 to the slave using
129 .Xr ypxfr 8 .
130 By default,
131 .Nm
132 sets up a server for
133 the system default domain.
134 The user can override this default by specifying
135 .Ar domainname
136 explicitly.
137 .It Fl u Op Ar domainname
138 Update the ypservers map on the master server.
139 When a new slave
140 server is added to a domain, its hostname must be added to the
141 ypservers map so that
142 .Xr yppush 8
143 can 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
148 Bootparams source file
149 .It Pa /etc/ethers
150 Ethers data source file
151 .It Pa /etc/group
152 Group source file
153 .It Pa /etc/hosts
154 Hostname/IP address source file
155 .It Pa /etc/netid
156 RPC netid source file
157 .It Pa /etc/networks
158 Networks source file
159 .It Pa /etc/protocols
160 Protocols source file
161 .It Pa /etc/publickey
162 RPC public key/secret key source file
163 .It Pa /etc/services
164 Services data source file
165 .It Pa /var/yp/master.passwd
166 Passwd database source file
167 .It Pa /var/yp/netgroup
168 Netgroup data source file
169 .It Pa /var/yp/ypservers
170 Ypservers source file (generated by
171 .Nm )
172 .El
173 .Sh SEE ALSO
174 .Xr mknetid 8 ,
175 .Xr revnetgroup 8 ,
176 .Xr yp 8 ,
177 .Xr yppush 8 ,
178 .Xr ypserv 8 ,
179 .Xr ypxfr 8 ,
180 .Xr yp_mkdb 8
181 .Sh HISTORY
182 This version of
183 .Nm
184 is based on the
185 .Nm
186 script in
187 .Ox .
188 It first appeared in
189 .Fx 3.0 .
190 .Sh AUTHORS
191 .An -nosplit
192 The original script was written by
193 .An Mats O Jansson Aq moj@stacken.kth.se .
194 It was modified for
195 .Fx
196 by
197 .An Bill Paul Aq wpaul@ctr.columbia.edu .