1.\" Copyright (c) 1995, 1996 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 University nor the names of its 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 CONTRIBUTORS BE LIABLE 23.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29.\" SUCH DAMAGE. 30.\" 31.\" $Id: yp_mkdb.8,v 1.1 1996/03/13 16:28:19 wpaul Exp wpaul $ 32.\" 33.Dd March 12, 1996 34.Dt YP_MKDB 8 35.Os 36.Sh NAME 37.Nm yp_mkdb 38.Nd "generate the NIS databases" 39.Sh SYNOPSIS 40.Nm yp_mkdb 41.Fl c 42.Nm yp_mkdb 43.Fl u Ar dbname 44.Nm yp_mkdb 45.Op Fl c 46.Op Fl i Ar inputfile 47.Op Fl o Ar outputfile 48.Op Fl m Ar mastername 49.Ar inputfile 50.Ar dbname 51.Sh DESCRIPTION 52.Nm yp_mkdb 53creates 54.Xr db 3 55style databases for use with FreeBSD's NIS server. 56.Nm yp_mkdb 57reads data from 58.Nm inputfile , 59and writes it to 60.Nm dbname 61in 62.Xr db 3 63format (using the hash table method). 64The input should be in 'key data' format, which is to say 65two fields of ASCII data separated by white space. The first field 66is assumed to be the key, and everything else is assumed to be 67the data. 68These databases are typically stored in 69.Nm /var/yp/[domainname] 70where 71.Nm domainname 72is the name of the NIS domain being served. 73.Nm yp_mkdb 74is usually invoked by 75.Nm /var/yp/Makefile. 76.Nm yp_mkdb 77can also be used to dump an NIS database file so that its 78contents can be examined. For security reasons, all databases that 79.Nm yp_mkdb 80creates are readable and writable by owner only (and usually the 81owner is root). 82.Sh OPTIONS 83The 84.Nm yp_mkdb 85command supports the following flags and options: 86.Bl -tag -width flag 87.It Fl c 88Causes 89.Nm yp_mkdb 90to send a YPPROC_CLEAR request to 91.Xr ypserv 8 92on the local host. This signal tells the server to close any open 93database descriptors and flush out its database cache. If used alone, 94this flag signals the server and does nothing else. If used as part 95of a database creation command, 96.Nm yp_mkdb 97will send the signal only after the new database has been successfully 98created. 99.It Fl u Ar dbname 100.Pp 101Dump (or 'unwind') an NIS database. This option can be used to 102inspect the contents of an existing NIS database. 103.It Op Fl i Ar inputfile 104.Pp 105When generating an NIS map, encode 106.Nm inputfile 107as a special entry in the database with called 108.Nm YP_INPUT_FILE. 109.Pp 110.It Op Fl o Ar outputfile 111.Pp 112When generating an NIS map, encode 113.Nm outputfile 114as a special entry in the database with called 115.Nm YP_OUTPUT_FILE . 116.Pp 117.It Op Fl m Ar mastername 118.Pp 119When generating an NIS map encode 120.Nm mastername 121as a special entry in the database with called 122.Nm YP_MASTER_NAME . 123This entry in the database is frequently used by various NIS utilities 124to determine the name of an NIS master server for a domain. By default, 125.Nm yp_mkdb 126assumes that the local host is the NIS master; the 127.Ar m 128option is used to override this default. 129.Sh FILES 130.Bl -tag -width Pa -compact 131.It Pa /var/yp/Makefile 132The Makefile that calls 133.Nm yp_mkdb 134to build the NIS databases. 135.Sh SEE ALSO 136.Xr ypserv 8 , 137.Xr db 3 138.Sh AUTHOR 139Bill Paul <wpaul@ctr.columbia.edu> 140