1a44e4d14SBill Paul.\" Copyright (c) 1995 2a44e4d14SBill Paul.\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. 3a44e4d14SBill Paul.\" 4a44e4d14SBill Paul.\" Redistribution and use in source and binary forms, with or without 5a44e4d14SBill Paul.\" modification, are permitted provided that the following conditions 6a44e4d14SBill Paul.\" are met: 7a44e4d14SBill Paul.\" 1. Redistributions of source code must retain the above copyright 8a44e4d14SBill Paul.\" notice, this list of conditions and the following disclaimer. 9a44e4d14SBill Paul.\" 2. Redistributions in binary form must reproduce the above copyright 10a44e4d14SBill Paul.\" notice, this list of conditions and the following disclaimer in the 11a44e4d14SBill Paul.\" documentation and/or other materials provided with the distribution. 12a44e4d14SBill Paul.\" 3. All advertising materials mentioning features or use of this software 13a44e4d14SBill Paul.\" must display the following acknowledgement: 14a44e4d14SBill Paul.\" This product includes software developed by Bill Paul. 15a44e4d14SBill Paul.\" 4. Neither the name of the University nor the names of its contributors 16a44e4d14SBill Paul.\" may be used to endorse or promote products derived from this software 17a44e4d14SBill Paul.\" without specific prior written permission. 18a44e4d14SBill Paul.\" 19a44e4d14SBill Paul.\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND 20a44e4d14SBill Paul.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 21a44e4d14SBill Paul.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 22a44e4d14SBill Paul.\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE 23a44e4d14SBill Paul.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24a44e4d14SBill Paul.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25a44e4d14SBill Paul.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26a44e4d14SBill Paul.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27a44e4d14SBill Paul.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28a44e4d14SBill Paul.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29a44e4d14SBill Paul.\" SUCH DAMAGE. 30a44e4d14SBill Paul.\" 317f3dea24SPeter Wemm.\" $FreeBSD$ 32a44e4d14SBill Paul.\" 33a44e4d14SBill Paul.Dd October 24, 1995 34a44e4d14SBill Paul.Dt REVNETGROUP 8 35a44e4d14SBill Paul.Os 36a44e4d14SBill Paul.Sh NAME 37a44e4d14SBill Paul.Nm revnetgroup 38a44e4d14SBill Paul.Nd "generate reverse netgroup data" 39a44e4d14SBill Paul.Sh SYNOPSIS 4076081989SRuslan Ermilov.Nm 41ee3b44f5SRuslan Ermilov.Fl u | h 42a44e4d14SBill Paul.Op Fl f Ar netgroup_file 43a44e4d14SBill Paul.Sh DESCRIPTION 443f162cb8SPhilippe CharnierThe 453f162cb8SPhilippe Charnier.Nm 463f162cb8SPhilippe Charnierutility processes the contents of a file in 47a44e4d14SBill Paul.Xr netgroup 5 48a44e4d14SBill Paulformat into what is called 49a44e4d14SBill Paul.Pa reverse netgroup 50c481aa05SRuslan Ermilovform. 51c481aa05SRuslan ErmilovThat is, where the original file shows 52a44e4d14SBill Paulnetgroup memberships in terms of which members reside in a particular 53a44e4d14SBill Paulgroup, the reverse netgroup format specifies what groups are associated 54c481aa05SRuslan Ermilovwith a particular member. 55c481aa05SRuslan ErmilovThis information is used to generate the 563029b69fSPhilippe Charnier.Pa netgroup.byuser 57a44e4d14SBill Pauland 58*0437688eSNiclas Zeising.Pa netgroup.byhost 593029b69fSPhilippe Charnier.Tn NIS 60c481aa05SRuslan Ermilovmaps. 61c481aa05SRuslan ErmilovThese reverse netgroup maps are used to help speed up 62a44e4d14SBill Paulnetgroup lookups, particularly for the 63a44e4d14SBill Paul.Fn innetgr 64a44e4d14SBill Paullibrary function. 65a44e4d14SBill Paul.Pp 66a44e4d14SBill PaulFor example, the standard 673029b69fSPhilippe Charnier.Pa /etc/netgroup 68c481aa05SRuslan Ermilovfile may list a netgroup and a list of its members. 69c481aa05SRuslan ErmilovHere, the 70a44e4d14SBill Paulnetgroup is considered the 713029b69fSPhilippe Charnier.Em key 72a44e4d14SBill Pauland the member names are the 733029b69fSPhilippe Charnier.Em data . 74a44e4d14SBill PaulBy contrast, the reverse 75*0437688eSNiclas Zeising.Pa netgroup.byuser 76a44e4d14SBill Pauldatabase lists each unique 77a44e4d14SBill Paulmember as the key and the netgroups to which the members belong become 78c481aa05SRuslan Ermilovthe data. 79c481aa05SRuslan ErmilovSeparate databases are created to hold information pertaining 80a44e4d14SBill Paulto users and hosts; this allows netgroup username lookups 81a44e4d14SBill Pauland netgroup hostname lookups to be performed using independent keyspaces. 82a44e4d14SBill Paul.Pp 83a44e4d14SBill PaulBy constructing these reverse netgroup databases (and the corresponding 843029b69fSPhilippe Charnier.Tn NIS 853029b69fSPhilippe Charniermaps) in advance, the 86a44e4d14SBill Paul.Xr getnetgrent 3 87a44e4d14SBill Paullibrary functions are spared from having to work out the dependencies 88c481aa05SRuslan Ermilovthemselves on the fly. 89c481aa05SRuslan ErmilovThis is important on networks with large numbers 90a44e4d14SBill Paulof users and hosts, since it can take a considerable amount of time 91a44e4d14SBill Paulto process very large netgroup databases. 92a44e4d14SBill Paul.Pp 93a44e4d14SBill PaulThe 943029b69fSPhilippe Charnier.Nm 95c481aa05SRuslan Ermilovutility prints its results on the standard output. 96c481aa05SRuslan ErmilovIt is usually called 97a44e4d14SBill Paulonly by 983029b69fSPhilippe Charnier.Pa /var/yp/Makefile 993029b69fSPhilippe Charnierwhen rebuilding the 1003029b69fSPhilippe Charnier.Tn NIS 1013029b69fSPhilippe Charniernetgroup maps. 102a44e4d14SBill Paul.Sh OPTIONS 103a44e4d14SBill PaulThe 1043029b69fSPhilippe Charnier.Nm 1053f162cb8SPhilippe Charnierutility supports the following options: 1063029b69fSPhilippe Charnier.Bl -tag -width indent 107a44e4d14SBill Paul.It Fl u 1083029b69fSPhilippe CharnierGenerate 1093029b69fSPhilippe Charnier.Pa netgroup.byuser 1103029b69fSPhilippe Charnieroutput; only username information in the 111a44e4d14SBill Pauloriginal netgroup file is processed. 112a44e4d14SBill Paul.It Fl h 1133029b69fSPhilippe CharnierGenerate 1143029b69fSPhilippe Charnier.Pa netgroup.byhost 1153029b69fSPhilippe Charnieroutput; only hostname information in the 116c481aa05SRuslan Ermilovoriginal netgroup file is processed. 117c481aa05SRuslan Ermilov(Note at least one of the 118a44e4d14SBill Paul.Fl u 119a44e4d14SBill Paulor 120a44e4d14SBill Paul.Fl h 121a44e4d14SBill Paulflags must be specified.) 122a44e4d14SBill Paul.It Op Fl f Ar netgroup_file 123a44e4d14SBill PaulThe 1243029b69fSPhilippe Charnier.Nm 1253f162cb8SPhilippe Charnierutility uses 1263029b69fSPhilippe Charnier.Pa /etc/netgroup 127c481aa05SRuslan Ermilovas its default input file. 128c481aa05SRuslan ErmilovThe 129a44e4d14SBill Paul.Fl f 130c481aa05SRuslan Ermilovflag allows the user to specify an alternate input file. 131c481aa05SRuslan ErmilovSpecifying ``-'' 132a44e4d14SBill Paulas the input file causes 1333029b69fSPhilippe Charnier.Nm 134a44e4d14SBill Paulto read from the standard input. 135a44e4d14SBill Paul.El 136a44e4d14SBill Paul.Sh FILES 1373029b69fSPhilippe Charnier.Bl -tag -width /var/yp/Makefile -compact 138a44e4d14SBill Paul.It Pa /var/yp/Makefile 1393029b69fSPhilippe Charnierthe Makefile that calls 140a44e4d14SBill Paul.Nm yp_mkdb 141a44e4d14SBill Pauland 14276081989SRuslan Ermilov.Nm 1433029b69fSPhilippe Charnierto build the 1443029b69fSPhilippe Charnier.Tn NIS 1453029b69fSPhilippe Charnierdatabases 146a44e4d14SBill Paul.It Pa /etc/netgroup 147c481aa05SRuslan Ermilovthe default netgroup database file. 148c481aa05SRuslan ErmilovThis file is most often found 1493029b69fSPhilippe Charnieronly on the 1503029b69fSPhilippe Charnier.Tn NIS 1513029b69fSPhilippe Charniermaster server 152a44e4d14SBill Paul.El 153a44e4d14SBill Paul.Sh SEE ALSO 154af202156SWolfram Schneider.Xr getnetgrent 3 , 155a44e4d14SBill Paul.Xr netgroup 5 , 156491a8429SRuslan Ermilov.Xr yp 8 , 157af202156SWolfram Schneider.Xr yp_mkdb 8 158c92c0f26SPhilippe Charnier.Sh AUTHORS 1593029b69fSPhilippe Charnier.An Bill Paul Aq wpaul@ctr.columbia.edu 160