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