]>
Commit | Line | Data |
---|---|---|
b7080c8e A |
1 | .\" $OpenBSD: revnetgroup.8,v 1.1 1997/04/15 22:06:14 maja Exp $ |
2 | .\" Copyright (c) 1995 | |
3 | .\" Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved. | |
4 | .\" | |
5 | .\" Redistribution and use in source and binary forms, with or without | |
6 | .\" modification, are permitted provided that the following conditions | |
7 | .\" are met: | |
8 | .\" 1. Redistributions of source code must retain the above copyright | |
9 | .\" notice, this list of conditions and the following disclaimer. | |
10 | .\" 2. Redistributions in binary form must reproduce the above copyright | |
11 | .\" notice, this list of conditions and the following disclaimer in the | |
12 | .\" documentation and/or other materials provided with the distribution. | |
13 | .\" 3. All advertising materials mentioning features or use of this software | |
14 | .\" must display the following acknowledgement: | |
15 | .\" This product includes software developed by Bill Paul. | |
16 | .\" 4. Neither the name of the University nor the names of its contributors | |
17 | .\" may be used to endorse or promote products derived from this software | |
18 | .\" without specific prior written permission. | |
19 | .\" | |
20 | .\" THIS SOFTWARE IS PROVIDED BY Bill Paul AND CONTRIBUTORS ``AS IS'' AND | |
21 | .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
22 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
23 | .\" ARE DISCLAIMED. IN NO EVENT SHALL Bill Paul OR CONTRIBUTORS BE LIABLE | |
24 | .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
26 | .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | .\" SUCH DAMAGE. | |
31 | .\" | |
32 | .\" $FreeBSD: revnetgroup.8,v 1.4 1997/02/22 14:22:03 peter Exp $ | |
33 | .\" | |
34 | .Dd October 24, 1995 | |
35 | .Dt REVNETGROUP 8 | |
36 | .Os | |
37 | .Sh NAME | |
38 | .Nm revnetgroup | |
39 | .Nd "generate reverse netgroup data" | |
40 | .Sh SYNOPSIS | |
41 | .Nm revnetgroup | |
42 | .Fl u | |
43 | .Fl h | |
44 | .Op Fl f Ar netgroup_file | |
45 | .Sh DESCRIPTION | |
46 | .Nm revnetgroup | |
47 | processes the contents of a file in | |
48 | .Xr netgroup 5 | |
49 | format into what is called | |
50 | .Pa reverse netgroup | |
51 | form. That is, where the original file shows | |
52 | netgroup memberships in terms of which members reside in a particular | |
53 | group, the reverse netgroup format specifies what groups are associated | |
54 | with a particular member. This information is used to generate the | |
55 | .Nm netgroup.byuser | |
56 | and | |
57 | .Nm netgroup.byhosts | |
58 | YP maps. These reverse netgroup maps are used to help speed up | |
59 | netgroup lookups, particularly for the | |
60 | .Fn innetgr | |
61 | library function. | |
62 | .Pp | |
63 | For example, the standard | |
64 | .Nm /etc/netgroup | |
65 | file may list a netgroup and a list of its members. Here, the | |
66 | netgroup is considered the | |
67 | .Pa key | |
68 | and the member names are the | |
69 | .Pa data . | |
70 | By contrast, the reverse | |
71 | .Nm netgroup.byusers | |
72 | database lists each unique | |
73 | member as the key and the netgroups to which the members belong become | |
74 | the data. Seperate databases are created to hold information pertaining | |
75 | to users and hosts; this allows netgroup username lookups | |
76 | and netgroup hostname lookups to be performed using independent keyspaces. | |
77 | .Pp | |
78 | By constructing these reverse netgroup databases (and the corresponding | |
79 | YP maps) in advance, the | |
80 | .Xr getnetgrent 3 | |
81 | library functions are spared from having to work out the dependencies | |
82 | themselves on the fly. This is important on networks with large numbers | |
83 | of users and hosts, since it can take a considerable amount of time | |
84 | to process very large netgroup databases. | |
85 | .Pp | |
86 | The | |
87 | .Nm revnetgroup | |
88 | command prints its results on the standard output. It is usually called | |
89 | only by | |
90 | .Nm /var/yp/\<domain\>/Makefile | |
91 | when rebuilding the YP netgroup maps. | |
92 | .Pp | |
93 | .Sh OPTIONS | |
94 | The | |
95 | .Nm revnetgroup | |
96 | command supports the following options: | |
97 | .Bl -tag -width flag | |
98 | .It Fl u | |
99 | Generate netgroup.byuser output; only username information in the | |
100 | original netgroup file is processed. | |
101 | .It Fl h | |
102 | Generate netgroup.byhost output; only hostname information in the | |
103 | original netgroup file is processed. (Note at least one of the | |
104 | .Fl u | |
105 | or | |
106 | .Fl h | |
107 | flags must be specified.) | |
108 | .It Op Fl f Ar netgroup_file | |
109 | The | |
110 | .Nm revnetgroup | |
111 | command uses | |
112 | .Nm /etc/netgroup | |
113 | as its default input file. The | |
114 | .Fl f | |
115 | flag allows the user to specify an alternate input file. Specifying ``-'' | |
116 | as the input file causes | |
117 | .Nm revnetgroup | |
118 | to read from the standard input. | |
119 | .El | |
120 | .Sh FILES | |
121 | .Bl -tag -width Pa -compact | |
122 | .It Pa /var/yp/\<domain\>Makefile | |
123 | The Makefile that calls | |
124 | .Nm makedbm | |
125 | and | |
126 | .Nm revnetgroup | |
127 | to build the YP databases. | |
128 | .It Pa /etc/netgroup | |
129 | The default netgroup database file. This file is most often found | |
130 | only on the YP master server. | |
131 | .El | |
132 | .Sh SEE ALSO | |
133 | .Xr getnetgrent 3 , | |
134 | .Xr yp 8 , | |
135 | .Xr netgroup 5 , | |
136 | .Xr makedbm 8 | |
137 | .Sh AUTHOR | |
138 | Bill Paul <wpaul@ctr.columbia.edu> |