xref: /openbsd/share/man/man5/netgroup.5 (revision e5dd7070)
1.\"	$OpenBSD: netgroup.5,v 1.17 2020/01/25 17:08:34 schwarze Exp $
2.\"	$NetBSD: netgroup.5,v 1.3 1995/03/18 14:58:34 cgd Exp $
3.\"
4.\" Copyright (c) 1992, 1993
5.\"	The Regents of the University of California.  All rights reserved.
6.\"
7.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions
9.\" are met:
10.\" 1. Redistributions of source code must retain the above copyright
11.\"    notice, this list of conditions and the following disclaimer.
12.\" 2. Redistributions in binary form must reproduce the above copyright
13.\"    notice, this list of conditions and the following disclaimer in the
14.\"    documentation and/or other materials provided with the distribution.
15.\" 3. 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 THE REGENTS 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 THE REGENTS 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.\"     @(#)netgroup.5	8.2 (Berkeley) 12/11/93
32.\"
33.Dd $Mdocdate: January 25 2020 $
34.Dt NETGROUP 5
35.Os
36.Sh NAME
37.Nm netgroup
38.Nd defines network groups
39.Sh DESCRIPTION
40The
41.Nm
42file specifies
43.Dq netgroups ,
44which are sets of
45.Sy (host, user, domain)
46tuples that are to be given similar network access.
47.Pp
48Each line in the file consists of a netgroup name followed by a list of
49the members of the netgroup.
50Each member can be either the name of another netgroup or a specification
51of a tuple as follows:
52.Bd -literal -offset indent
53(host, user, domain)
54.Ed
55.Pp
56where the
57.Ar host ,
58.Ar user ,
59and
60.Ar domain
61are character string names for the corresponding component.
62Any of the comma separated fields may be empty to specify a
63.Dq wildcard
64value or may consist of the single character
65.Dq \&-
66to specify
67.Dq no valid value .
68The members of the list may be separated by whitespace; the
69.Dq \e
70character may be used at the end of a line to specify line continuation.
71.Pp
72Lines that begin with a
73.Ql #
74are treated as comments.
75.Pp
76After modification of
77.Pa /etc/netgroup ,
78.Xr netgroup_mkdb 8
79should be run, as the
80.Xr getnetgrent 3
81functions only operate on the Berkeley DB file
82.Pa /etc/netgroup.db .
83.Pp
84If that file is not present, and the system supports NIS, then the
85.Nm
86NIS maps are used.
87The NIS maps are also used if the
88.Nm
89file contains a
90.Dq +
91entry.
92.Sh FILES
93.Bl -tag -width /etc/netgroup.db -compact
94.It Pa /etc/netgroup
95default netgroup list
96.It Pa /etc/netgroup.db
97netgroup database
98.El
99.Sh EXAMPLES
100Define a group of three machines:
101.Pp
102.Dl friends (10.0.0.2,,) (10.0.0.3,,) (10.0.0.4,,)
103.Pp
104This group can be used in
105.Xr exports 5
106as follows:
107.Pp
108.Dl /home -maproot=nobody friends
109.Sh SEE ALSO
110.Xr dbopen 3 ,
111.Xr getnetgrent 3 ,
112.Xr exports 5 ,
113.Xr netgroup_mkdb 8
114.Sh STANDARDS
115The file format is compatible with that of various vendors, although it
116appears that not all vendors use an identical format.
117.Sh BUGS
118The interpretation of access restrictions based on the member tuples of a
119netgroup is left up to the various network applications.
120