1*550147bdSsnj.\" $NetBSD: netgroup_mkdb.8,v 1.9 2009/10/21 01:07:47 snj Exp $ 2350a2a77Schristos.\" 3350a2a77Schristos.\" Copyright (c) 1994 Christos Zoulas 4350a2a77Schristos.\" All rights reserved. 5350a2a77Schristos.\" 6350a2a77Schristos.\" Redistribution and use in source and binary forms, with or without 7350a2a77Schristos.\" modification, are permitted provided that the following conditions 8350a2a77Schristos.\" are met: 9350a2a77Schristos.\" 1. Redistributions of source code must retain the above copyright 10350a2a77Schristos.\" notice, this list of conditions and the following disclaimer. 11350a2a77Schristos.\" 2. Redistributions in binary form must reproduce the above copyright 12350a2a77Schristos.\" notice, this list of conditions and the following disclaimer in the 13350a2a77Schristos.\" documentation and/or other materials provided with the distribution. 14350a2a77Schristos.\" 15350a2a77Schristos.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 16350a2a77Schristos.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 17350a2a77Schristos.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 18350a2a77Schristos.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 19350a2a77Schristos.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 20350a2a77Schristos.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 21350a2a77Schristos.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22350a2a77Schristos.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23350a2a77Schristos.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24350a2a77Schristos.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25350a2a77Schristos.\" 26d4373f6dSseb.Dd May 20, 2007 27350a2a77Schristos.Dt NETGROUP_MKDB 8 28350a2a77Schristos.Os 29350a2a77Schristos.Sh NAME 30350a2a77Schristos.Nm netgroup_mkdb 319783f22cSlukem.Nd generate the netgroup database 32350a2a77Schristos.Sh SYNOPSIS 334eb76530Slukem.Nm 34350a2a77Schristos.Op Fl o Ar database 3517274783Schristos.Op file 36350a2a77Schristos.Sh DESCRIPTION 374eb76530Slukem.Nm 389783f22cSlukemcreates a 39350a2a77Schristos.Xr db 3 409783f22cSlukemdatabase for the specified file. 419783f22cSlukemIf no file is specified, then 4217274783Schristos.Pa /etc/netgroup 4317274783Schristosis used. 449783f22cSlukemThis database is installed into 45d4373f6dSseb.Pa /var/db/netgroup.db . 46350a2a77SchristosThe file must be in the correct format (see 47350a2a77Schristos.Xr netgroup 5 ) . 48350a2a77Schristos.Pp 49350a2a77SchristosThe options are as follows: 50350a2a77Schristos.Bl -tag -width indent 51350a2a77Schristos.It Fl o Ar database 52350a2a77SchristosPut the output databases in the named file. 53350a2a77Schristos.El 54350a2a77Schristos.Pp 55350a2a77SchristosThe databases are used by the C library netgroup routines (see 56350a2a77Schristos.Xr getnetgrent 3 ) . 57350a2a77Schristos.Pp 584eb76530Slukem.Nm 59350a2a77Schristosexits zero on success, non-zero on failure. 60350a2a77Schristos.Sh FILES 61350a2a77Schristos.Bl -tag -width 24n -compact 62d4373f6dSseb.It Pa /var/db/netgroup.db 63350a2a77SchristosThe current netgroup database 64d4373f6dSseb.It Pa /var/db/netgroup.db.tmp 6517274783SchristosA temporary file 66350a2a77Schristos.It Pa /etc/netgroup 67350a2a77SchristosThe current netgroup file 68350a2a77Schristos.El 696aaa7bfdSwiz.Sh SEE ALSO 706aaa7bfdSwiz.Xr db 3 , 716aaa7bfdSwiz.Xr getnetgrent 3 , 726aaa7bfdSwiz.Xr netgroup 5 7317274783Schristos.Sh BUGS 7417274783SchristosBecause 754eb76530Slukem.Nm 7617274783Schristosguarantees not to install a partial destination file it must 7717274783Schristosbuild a temporary file in the same file system and if successful use 7817274783Schristos.Xr rename 2 7917274783Schristosto install over the destination file. 8017274783Schristos.Pp 8117274783SchristosIf 824eb76530Slukem.Nm 8317274783Schristosfails it will leave the previous version of the destination file intact. 84