1*f8dbdd72Sschwarze.\" $OpenBSD: group.5,v 1.15 2012/06/20 22:15:13 schwarze Exp $ 2df930be7Sderaadt.\" $NetBSD: group.5,v 1.4 1995/07/28 06:41:39 phil Exp $ 3df930be7Sderaadt.\" 4df930be7Sderaadt.\" Copyright (c) 1980, 1991, 1993 5df930be7Sderaadt.\" The Regents of the University of California. All rights reserved. 6df930be7Sderaadt.\" Portions Copyright(c) 1994, Jason Downs. All rights reserved. 7df930be7Sderaadt.\" 8df930be7Sderaadt.\" Redistribution and use in source and binary forms, with or without 9df930be7Sderaadt.\" modification, are permitted provided that the following conditions 10df930be7Sderaadt.\" are met: 11df930be7Sderaadt.\" 1. Redistributions of source code must retain the above copyright 12df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer. 13df930be7Sderaadt.\" 2. Redistributions in binary form must reproduce the above copyright 14df930be7Sderaadt.\" notice, this list of conditions and the following disclaimer in the 15df930be7Sderaadt.\" documentation and/or other materials provided with the distribution. 1629295d1cSmillert.\" 3. Neither the name of the University nor the names of its contributors 17df930be7Sderaadt.\" may be used to endorse or promote products derived from this software 18df930be7Sderaadt.\" without specific prior written permission. 19df930be7Sderaadt.\" 20df930be7Sderaadt.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21df930be7Sderaadt.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22df930be7Sderaadt.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23df930be7Sderaadt.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24df930be7Sderaadt.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25df930be7Sderaadt.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26df930be7Sderaadt.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27df930be7Sderaadt.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28df930be7Sderaadt.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29df930be7Sderaadt.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30df930be7Sderaadt.\" SUCH DAMAGE. 31df930be7Sderaadt.\" 32df930be7Sderaadt.\" @(#)group.5 8.3 (Berkeley) 4/19/94 33df930be7Sderaadt.\" 34*f8dbdd72Sschwarze.Dd $Mdocdate: June 20 2012 $ 35df930be7Sderaadt.Dt GROUP 5 36df930be7Sderaadt.Os 37df930be7Sderaadt.Sh NAME 38df930be7Sderaadt.Nm group 39df930be7Sderaadt.Nd format of the group permissions file 40df930be7Sderaadt.Sh DESCRIPTION 41df930be7SderaadtThe file 42ae8c025fSaaron.Pa /etc/group 43df930be7Sderaadtconsists of newline separated 44df930be7Sderaadt.Tn ASCII 45df930be7Sderaadtrecords, one per group, containing four colon 46431305c8Saaron.Pq Ql \&: 471f53fde1Saaronseparated fields. 481f53fde1SaaronThese fields are as follows: 49ae8c025fSaaron.Pp 50df930be7Sderaadt.Bl -tag -width password -offset indent -compact 51df930be7Sderaadt.It group 52df930be7SderaadtName of the group. 53df930be7Sderaadt.It passwd 54ae8c025fSaaronGroup's encrypted password. 55df930be7Sderaadt.It gid 56df930be7SderaadtThe group's decimal ID. 57df930be7Sderaadt.It member 58df930be7SderaadtGroup members. 59df930be7Sderaadt.El 60df930be7Sderaadt.Pp 61df930be7SderaadtThe 62df930be7Sderaadt.Ar group 63df930be7Sderaadtfield is the group name used for granting file access to users 64df930be7Sderaadtwho are members of the group. 65df930be7SderaadtThe 66df930be7Sderaadt.Ar gid 67df930be7Sderaadtfield is the number associated with the group name. 68df930be7SderaadtThey should both be unique across the system (and often 69df930be7Sderaadtacross a group of systems) since they control file access. 70df930be7SderaadtThe 71df930be7Sderaadt.Ar passwd 72431305c8Saaronfield is an optional encrypted password. 73431305c8SaaronThis field is rarely used and an asterisk is normally placed in it 74431305c8Saaronrather than leaving it blank. 75df930be7SderaadtThe 76df930be7Sderaadt.Ar member 77df930be7Sderaadtfield contains the names of users granted the privileges of 78df930be7Sderaadt.Ar group . 79df930be7SderaadtThe member names are separated by commas without spaces or newlines. 80431305c8SaaronA user is automatically in a group if that group was specified in their 81*f8dbdd72Sschwarze.Xr passwd 5 82df930be7Sderaadtentry and does not need to be added to that group in the 83*f8dbdd72Sschwarze.Nm 84ae8c025fSaaronfile. 85df930be7Sderaadt.\" .Pp 86df930be7Sderaadt.\" When the system reads the file 87df930be7Sderaadt.\" .Pa /etc/group 88df930be7Sderaadt.\" the fields are read into the structure 89df930be7Sderaadt.\" .Fa group 90df930be7Sderaadt.\" declared in 91df930be7Sderaadt.\" .Aq Pa grp.h : 92df930be7Sderaadt.\" .Bd -literal -offset indent 93df930be7Sderaadt.\" struct group { 94df930be7Sderaadt.\" char *gr_name; /* group name */ 95df930be7Sderaadt.\" char *gr_passwd; /* group password */ 96df930be7Sderaadt.\" int gr_gid; /* group id */ 97df930be7Sderaadt.\" char **gr_mem; /* group members */ 98df930be7Sderaadt.\" }; 99df930be7Sderaadt.\" .Ed 100df930be7Sderaadt.Sh YP SUPPORT 101df930be7SderaadtIf YP is active, the 102df930be7Sderaadt.Nm 1037584db8dSschwarzefile also supports YP exclusions and inclusions. 1047584db8dSschwarze.Pp 1057584db8dSschwarzeLines beginning with a 1067584db8dSschwarze.Ql \&- 1077584db8dSschwarze(minus sign) are entries marked as being excluded from any following 1087584db8dSschwarzeinclusions, which are marked with a `+' (plus sign). 1097584db8dSschwarze.Pp 1107584db8dSschwarzeLines of the format 111c0a5368cSaaron.Bd -literal -offset indent 112df930be7Sderaadt+name:*:: 113c0a5368cSaaron.Ed 114df930be7Sderaadt.Pp 1157584db8dSschwarzecause the specified group to be included from the 116df930be7Sderaadt.Pa group.byname 117df930be7SderaadtYP map. 118ae8c025fSaaronIf no group name is specified, or the 119c0a5368cSaaron.Ql + 120431305c8Saaron(plus sign) appears alone on a line, all groups are included from the YP map. 121df930be7Sderaadt.Pp 122ae8c025fSaaronYP references may appear anywhere in the file, but the single 123c0a5368cSaaron.Ql + 124ae8c025fSaaronform should be on the last line, for historical reasons. 125df930be7SderaadtOnly the first group with a specific name encountered, whether in the 126df930be7Sderaadt.Nm 127df930be7Sderaadtfile itself, or included via YP, will be used. 1282192f3d8Sderaadt.Pp 1292192f3d8SderaadtProper YP group support requires consistent 1302192f3d8Sderaadt.Pa group.byname , 1312192f3d8Sderaadt.Pa group.bygid 1322192f3d8Sderaadtand 1332192f3d8Sderaadt.Pa netid.byname 1342192f3d8SderaadtYP maps. 1352192f3d8SderaadtSee 1362192f3d8Sderaadt.Xr getgrent 3 1372192f3d8Sderaadtand 1382192f3d8Sderaadt.Xr getgrouplist 3 1392192f3d8Sderaadtfor details. 1402b13c5a5Sschwarze.Pp 1412b13c5a5SschwarzeWhen YP is enabled but temporarily unavailable, login becomes impossible 1422b13c5a5Sschwarzefor all users except those having an entry in the 1432b13c5a5Sschwarze.Xr netid 5 1442b13c5a5Sschwarzefile. 145df930be7Sderaadt.Sh FILES 146df930be7Sderaadt.Bl -tag -width /etc/group -compact 147df930be7Sderaadt.It Pa /etc/group 148df930be7Sderaadt.El 149df930be7Sderaadt.Sh SEE ALSO 150df930be7Sderaadt.Xr passwd 1 , 151ae8c025fSaaron.Xr setgroups 2 , 152ae8c025fSaaron.Xr crypt 3 , 153ae8c025fSaaron.Xr initgroups 3 , 1542b13c5a5Sschwarze.Xr netid 5 , 155df930be7Sderaadt.Xr passwd 5 , 156df930be7Sderaadt.Xr yp 8 157df930be7Sderaadt.Sh HISTORY 158*f8dbdd72SschwarzeThe 159df930be7Sderaadt.Nm 160*f8dbdd72Sschwarzefile format first appeared in 161df930be7Sderaadt.At v6 . 162df930be7Sderaadt.Pp 163c0a5368cSaaronThe YP file format first appeared in SunOS. 1643b1d4ce7Sjmc.Sh BUGS 1653b1d4ce7SjmcThe 1663b1d4ce7Sjmc.Xr passwd 1 1673b1d4ce7Sjmccommand does not change the 1683b1d4ce7Sjmc.Nm 1693b1d4ce7Sjmcpasswords. 1707ea3c341Sjmc.Pp 1717ea3c341SjmcLines in 1727ea3c341Sjmc.Pa /etc/group 1737ea3c341Sjmcare limited to 1024 characters. 1747ea3c341SjmcYP groups are not affected by this limit. 1757ea3c341Sjmc.Pp 1767ea3c341SjmcGroups are limited to a maximum of 200 members per group. 177