xref: /netbsd-src/share/man/man5/netgroup.5 (revision 2a65137f552b06844d6d4647074580ad3b40d634)
1.\"	$NetBSD: netgroup.5,v 1.9 2014/09/19 16:02:58 wiz Exp $
2.\"
3.\" Copyright (c) 1992, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. Neither the name of the University nor the names of its contributors
15.\"    may be used to endorse or promote products derived from this software
16.\"    without specific prior written permission.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28.\" SUCH DAMAGE.
29.\"
30.\"     @(#)netgroup.5	8.2 (Berkeley) 12/11/93
31.\"
32.Dd January 16, 1999
33.Dt NETGROUP 5
34.Os
35.Sh NAME
36.Nm netgroup
37.Nd defines network groups
38.Sh SYNOPSIS
39.Nm netgroup
40.Sh DESCRIPTION
41The
42.Nm netgroup
43file
44specifies
45.Dq netgroups ,
46which are sets of
47.Sy (host, user, domain)
48tuples that are to be given similar network access.
49.Pp
50Each line in the file
51consists of a netgroup name followed by a list of the members of the
52netgroup.
53Each member can be either the name of another netgroup or a specification
54of a tuple as follows:
55.Bd -literal -offset indent
56(host, user, domain)
57.Ed
58.Pp
59where the
60.Sy host ,
61.Sy user ,
62and
63.Sy domain
64are character string names for the corresponding component.
65Any of the comma separated fields may be empty to specify a
66.Dq wildcard
67value
68or may consist of the string
69.Dq Li -
70to specify
71.Dq no valid value .
72The members of the list may be separated by whitespace;
73the
74.Dq \e
75character may be used at the end of a line to specify
76line continuation.
77The functions specified in
78.Xr getnetgrent 3
79should normally be used to access the
80.Nm netgroup
81database.
82.Pp
83If
84.Sq files
85is specified for the
86.Sq netgroup
87database in
88.Xr nsswitch.conf 5 ,
89(or no
90.Sq netgroup
91entry is specified), then these functions operate on the
92.Xr db 3
93version of the
94.Nm netgroup
95.Nm (netgroup.db)
96file which can be generated using
97.Xr netgroup_mkdb 8 .
98If
99.Sq nis
100is specified then the
101.Tn NIS
102maps
103.Sq netgroup ,
104.Sq netgroup.byhost ,
105and
106.Sq netgroup.byuser
107are used.
108.Pp
109Lines that begin with a # are treated as comments.
110.Sh FILES
111.Bl -tag -width /etc/netgroup.db -compact
112.It Pa /etc/netgroup.db
113the netgroup database.
114.El
115.Sh COMPATIBILITY
116The file format is compatible with that of various vendors, however it
117appears that not all vendors use an identical format.
118.Sh SEE ALSO
119.Xr getnetgrent 3 ,
120.Xr exports 5 ,
121.Xr nsswitch.conf 5 ,
122.Xr netgroup_mkdb 8
123.Sh BUGS
124The interpretation of access restrictions based on the member tuples of a
125netgroup is left up to the various network applications.
126