xref: /openbsd-src/share/man/man5/netgroup.5 (revision c90a81c56dcebd6a1b73fe4aff9b03385b8e63b3)
1.\"	$OpenBSD: netgroup.5,v 1.16 2017/07/13 19:16:33 jmc 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: July 13 2017 $
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.
71The functions specified in
72.Xr getnetgrent 3
73should normally be used to access the
74.Nm
75database.
76.Pp
77These functions operate on the Berkeley DB version of the
78.Nm
79.Pq Pa netgroup.db
80file which can be generated using
81.Xr netgroup_mkdb 8 .
82If that file is not present, and the system supports NIS, then the
83.Nm
84NIS maps are used.
85The NIS maps are also used if the
86.Nm
87file contains a
88.Dq +
89entry.
90.Pp
91Lines that begin with a
92.Ql #
93are treated as comments.
94.Sh FILES
95.Bl -tag -width /etc/netgroup.db -compact
96.It Pa /etc/netgroup
97default netgroup list
98.It Pa /etc/netgroup.db
99netgroup database
100.El
101.Sh SEE ALSO
102.Xr dbopen 3 ,
103.Xr getnetgrent 3 ,
104.Xr exports 5 ,
105.Xr netgroup_mkdb 8
106.Sh STANDARDS
107The file format is compatible with that of various vendors, although it
108appears that not all vendors use an identical format.
109.Sh BUGS
110The interpretation of access restrictions based on the member tuples of a
111netgroup is left up to the various network applications.
112