add .Mt to man pages in libexec/
[dragonfly.git] / libexec / revnetgroup / revnetgroup.8
... / ...
CommitLineData
1.\" Copyright (c) 1995
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.\" $FreeBSD: src/libexec/revnetgroup/revnetgroup.8,v 1.7.2.4 2002/08/15 18:53:16 schweikh Exp $
32.\"
33.Dd October 24, 1995
34.Dt REVNETGROUP 8
35.Os
36.Sh NAME
37.Nm revnetgroup
38.Nd "generate reverse netgroup data"
39.Sh SYNOPSIS
40.Nm
41.Fl u
42.Op Fl f Ar netgroup_file
43.Nm
44.Fl h
45.Op Fl f Ar netgroup_file
46.Sh DESCRIPTION
47.Nm Revnetgroup
48processes the contents of a file in
49.Xr netgroup 5
50format into what is called
51.Dq reverse netgroup
52form. That is, where the original file shows
53netgroup memberships in terms of which members reside in a particular
54group, the reverse netgroup format specifies what groups are associated
55with a particular member. This information is used to generate the
56.Pa netgroup.byuser
57and
58.Pa netgroup.byhosts
59.Tn NIS
60maps. These reverse netgroup maps are used to help speed up
61netgroup lookups, particularly for the
62.Fn innetgr
63library function.
64.Pp
65For example, the standard
66.Pa /etc/netgroup
67file may list a netgroup and a list of its members. Here, the
68netgroup is considered the
69.Em key
70and the member names are the
71.Em data .
72By contrast, the reverse
73.Pa netgroup.byusers
74database lists each unique
75member as the key and the netgroups to which the members belong become
76the data. Separate databases are created to hold information pertaining
77to users and hosts; this allows netgroup username lookups
78and netgroup hostname lookups to be performed using independent keyspaces.
79.Pp
80By constructing these reverse netgroup databases (and the corresponding
81.Tn NIS
82maps) in advance, the
83.Xr getnetgrent 3
84library functions are spared from having to work out the dependencies
85themselves on the fly. This is important on networks with large numbers
86of users and hosts, since it can take a considerable amount of time
87to process very large netgroup databases.
88.Pp
89The
90.Nm
91command prints its results on the standard output. It is usually called
92only by
93.Pa /var/yp/Makefile
94when rebuilding the
95.Tn NIS
96netgroup maps.
97.Sh OPTIONS
98The
99.Nm
100command supports the following options:
101.Bl -tag -width indent
102.It Fl u
103Generate
104.Pa netgroup.byuser
105output; only username information in the
106original netgroup file is processed.
107.It Fl h
108Generate
109.Pa netgroup.byhost
110output; only hostname information in the
111original netgroup file is processed. (Note at least one of the
112.Fl u
113or
114.Fl h
115flags must be specified.)
116.It Op Fl f Ar netgroup_file
117The
118.Nm
119command uses
120.Pa /etc/netgroup
121as its default input file. The
122.Fl f
123flag allows the user to specify an alternate input file. Specifying ``-''
124as the input file causes
125.Nm
126to read from the standard input.
127.El
128.Sh FILES
129.Bl -tag -width /var/yp/Makefile -compact
130.It Pa /var/yp/Makefile
131the Makefile that calls
132.Nm yp_mkdb
133and
134.Nm
135to build the
136.Tn NIS
137databases
138.It Pa /etc/netgroup
139the default netgroup database file. This file is most often found
140only on the
141.Tn NIS
142master server
143.El
144.Sh SEE ALSO
145.Xr getnetgrent 3 ,
146.Xr netgroup 5 ,
147.Xr yp 8 ,
148.Xr yp_mkdb 8
149.Sh AUTHORS
150.An Bill Paul Aq Mt wpaul@ctr.columbia.edu