1.\" Copyright (c) 1980, 1991, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 2. Redistributions in binary form must reproduce the above copyright 10.\" notice, this list of conditions and the following disclaimer in the 11.\" documentation and/or other materials provided with the distribution. 12.\" 3. All advertising materials mentioning features or use of this software 13.\" must display the following acknowledgement: 14.\" This product includes software developed by the University of 15.\" California, Berkeley and its contributors. 16.\" 4. Neither the name of the University nor the names of its contributors 17.\" may be used to endorse or promote products derived from this software 18.\" without specific prior written permission. 19.\" 20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30.\" SUCH DAMAGE. 31.\" 32.\" From: @(#)group.5 8.3 (Berkeley) 4/19/94 33.\" $FreeBSD$ 34.\" 35.Dd September 29, 1994 36.Dt GROUP 5 37.Os 38.Sh NAME 39.Nm group 40.Nd format of the group permissions file 41.Sh DESCRIPTION 42The file 43.Nm 44file is the local source of group information. 45It can be used in conjunction with the Hesiod domain 46`group', and the NIS maps `group.byname' and `group.bygid', 47as controlled by 48.Xr nsswitch.conf 5 . 49.Pp 50The file 51.Nm 52consists of newline separated 53.Tn ASCII 54records, one per group, containing four colon 55.Ql \&: 56separated fields. 57These fields are as follows: 58.Bl -tag -width password -offset indent -compact 59.It group 60Name of the group. 61.It passwd 62Group's 63.Em encrypted 64password. 65.It gid 66The group's decimal ID. 67.It member 68Group members. 69.El 70.Pp 71Lines whose first non-whitespace character is a pound-sign (#) 72are comments, and are ignored. 73Blank lines that consist 74only of spaces, tabs or newlines are also ignored. 75.Pp 76The 77.Ar group 78field is the group name used for granting file access to users 79who are members of the group. 80The 81.Ar gid 82field is the number associated with the group name. 83They should both be unique across the system (and often 84across a group of systems) since they control file access. 85The 86.Ar passwd 87field 88is an optional 89.Em encrypted 90password. 91This field is rarely used 92and an asterisk is normally placed in it rather than leaving it blank. 93The 94.Ar member 95field contains the names of users granted the privileges of 96.Ar group . 97The member names are separated by commas without spaces or newlines. 98A user is automatically in a group if that group was specified 99in their 100.Pa /etc/passwd 101entry and does not need to be added to that group in the 102.Nm 103file. 104.\" .Pp 105.\" When the system reads the file 106.\" .Pa /etc/group 107.\" the fields are read into the structure 108.\" .Fa group 109.\" declared in 110.\" .Aq Pa grp.h : 111.\" .Bd -literal -offset indent 112.\" struct group { 113.\" char *gr_name; /* group name */ 114.\" char *gr_passwd; /* group password */ 115.\" int gr_gid; /* group id */ 116.\" char **gr_mem; /* group members */ 117.\" }; 118.\" .Ed 119.Sh LIMITS 120There are various limitations which are explained in 121the function where they occur; see section 122.Sx SEE ALSO . 123.Pp 124In older implementations, 125a group cannot have more than 200 members. 126The maximum line length of 127.Pa /etc/group 128is 1024 characters. 129Longer lines will be skipped. 130This limitation disappeared in 131.Fx 3.0 . 132Older binaries that are statically linked, depend on old 133shared libraries, or 134.No non- Ns Fx 135binaries in compatibility mode 136may still have this limit. 137.Sh FILES 138.Bl -tag -width /etc/group -compact 139.It Pa /etc/group 140.El 141.Sh SEE ALSO 142.Xr passwd 1 , 143.Xr setgroups 2 , 144.Xr crypt 3 , 145.Xr getgrent 3 , 146.Xr initgroups 3 , 147.Xr nsswitch.conf 5 , 148.Xr passwd 5 , 149.Xr yp 8 150.Sh BUGS 151The 152.Xr passwd 1 153command does not change the 154.Nm 155passwords. 156.Sh HISTORY 157A 158.Nm 159file format appeared in 160.At v6 . 161Support for comments first appeared in 162.Fx 3.0 . 163