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