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