1.\" $OpenBSD: netgroup.5,v 1.14 2007/05/31 19:19:58 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: May 31 2007 $ 34.Dt NETGROUP 5 35.Os 36.Sh NAME 37.Nm netgroup 38.Nd defines network groups 39.Sh SYNOPSIS 40.Nm /etc/netgroup 41.Sh DESCRIPTION 42The 43.Nm 44file specifies 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 consists of a netgroup name followed by a list of 51the members of the netgroup. 52Each member can be either the name of another netgroup or a specification 53of a tuple as follows: 54.Bd -literal -offset indent 55(host, user, domain) 56.Ed 57.Pp 58where the 59.Ar host , 60.Ar user , 61and 62.Ar domain 63are character string names for the corresponding component. 64Any of the comma separated fields may be empty to specify a 65.Dq wildcard 66value or may consist of the single character 67.Dq \&- 68to specify 69.Dq no valid value . 70The members of the list may be separated by whitespace; the 71.Dq \e 72character may be used at the end of a line to specify line continuation. 73The functions specified in 74.Xr getnetgrent 3 75should normally be used to access the 76.Nm 77database. 78.Pp 79These functions operate on the 80.Xr db 3 81version of the 82.Nm 83.Pq Pa netgroup.db 84file which can be generated using 85.Xr netgroup_mkdb 8 . 86If that file is not present, and the system supports NIS, then the 87.Nm 88NIS maps are used. 89The NIS maps are also used if the 90.Nm 91file contains a 92.Dq + 93entry. 94.Pp 95Lines that begin with a 96.Ql # 97are treated as comments. 98.Sh FILES 99.Bl -tag -width /etc/netgroup.db -compact 100.It Pa /etc/netgroup 101default netgroup list 102.It Pa /etc/netgroup.db 103netgroup database 104.El 105.Sh SEE ALSO 106.Xr getnetgrent 3 , 107.Xr exports 5 , 108.Xr netgroup_mkdb 8 109.Sh STANDARDS 110The file format is compatible with that of various vendors, although it 111appears that not all vendors use an identical format. 112.Sh BUGS 113The interpretation of access restrictions based on the member tuples of a 114netgroup is left up to the various network applications. 115