1.\" $OpenBSD: netgroup.5,v 1.10 2001/11/13 13:54:26 mpech 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. All advertising materials mentioning features or use of this software 16.\" must display the following acknowledgement: 17.\" This product includes software developed by the University of 18.\" California, Berkeley and its contributors. 19.\" 4. Neither the name of the University nor the names of its contributors 20.\" may be used to endorse or promote products derived from this software 21.\" without specific prior written permission. 22.\" 23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)netgroup.5 8.2 (Berkeley) 12/11/93 36.\" 37.Dd December 11, 1993 38.Dt NETGROUP 5 39.Os 40.Sh NAME 41.Nm netgroup 42.Nd defines network groups 43.Sh SYNOPSIS 44.Nm netgroup 45.Sh DESCRIPTION 46The 47.Nm 48file specifies 49.Dq netgroups , 50which are sets of 51.Sy (host, user, domain) 52tuples that are to be given similar network access. 53.Pp 54Each line in the file consists of a netgroup name followed by a list of 55the members of the netgroup. 56Each member can be either the name of another netgroup or a specification 57of a tuple as follows: 58.Bd -literal -offset indent 59(host, user, domain) 60.Ed 61.Pp 62where the 63.Ar host , 64.Ar user , 65and 66.Ar domain 67are character string names for the corresponding component. 68Any of the comma separated fields may be empty to specify a 69.Dq wildcard 70value or may consist of the single character 71.Dq \&- 72to specify 73.Dq no valid value . 74The members of the list may be separated by whitespace; the 75.Dq \e 76character may be used at the end of a line to specify line continuation. 77The functions specified in 78.Xr getnetgrent 3 79should normally be used to access the 80.Nm 81database. 82.Pp 83These functions operate on the 84.Xr db 3 85version of the 86.Nm 87.Pq Pa netgroup.db 88file which can be generated using 89.Xr netgroup_mkdb 8 . 90If that file is not present, and the system supports NIS, then the 91.Nm 92NIS maps are used. 93The NIS maps are also used if the 94.Nm 95file contains a 96.Dq + 97entry. 98.Pp 99Lines that begin with a 100.Ql # 101are treated as comments. 102.Sh FILES 103.Bl -tag -width /etc/netgroup.db -compact 104.It Pa /etc/netgroup.db 105netgroup database 106.El 107.Sh SEE ALSO 108.Xr getnetgrent 3 , 109.Xr exports 5 , 110.Xr netgroup_mkdb 8 111.Sh COMPATIBILITY 112The file format is compatible with that of various vendors, although it 113appears that not all vendors use an identical format. 114.Sh BUGS 115The interpretation of access restrictions based on the member tuples of a 116netgroup is left up to the various network applications. 117