xref: /original-bsd/share/man/man5/group.5 (revision e58c8952)
1.\" Copyright (c) 1980, 1991, 1993
2.\"	The Regents of the University of California.  All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\"     @(#)group.5	8.3 (Berkeley) 04/19/94
7.\"
8.Dd
9.Dt GROUP 5
10.Os
11.Sh NAME
12.Nm group
13.Nd format of the group permissions file
14.Sh DESCRIPTION
15The file
16.Aq Pa /etc/group
17consists of newline separated
18.Tn ASCII
19records, one per group, containing four colon
20.Ql \&:
21separated fields. These fields are as follows:
22.Bl -tag -width password -offset indent -compact
23.It group
24Name of the group.
25.It passwd
26Group's
27.Em encrypted
28password.
29.It gid
30The group's decimal ID.
31.It member
32Group members.
33.El
34.Pp
35The
36.Ar group
37field is the group name used for granting file access to users
38who are members of the group.
39The
40.Ar gid
41field is the number associated with the group name.
42They should both be unique across the system (and often
43across a group of systems) since they control file access.
44The
45.Ar passwd
46field
47is an optional
48.Em encrypted
49password.
50This field is rarely used
51and an asterisk is normally placed in it rather than leaving it blank.
52The
53.Ar member
54field contains the names of users granted the privileges of
55.Ar group .
56The member names are separated by commas without spaces or newlines.
57A user is automatically in a group if that group was specified
58in their
59.Pa /etc/passwd
60entry and does not need to be added to that group in the
61.Pa /etc/group file.
62.\" .Pp
63.\" When the system reads the file
64.\" .Pa /etc/group
65.\" the fields are read into the structure
66.\" .Fa group
67.\" declared in
68.\" .Aq Pa grp.h :
69.\" .Bd -literal -offset indent
70.\" struct group {
71.\"	char    *gr_name;        /* group name */
72.\"	char    *gr_passwd;      /* group password */
73.\"	int     gr_gid;          /* group id */
74.\"	char    **gr_mem;        /* group members */
75.\" };
76.\" .Ed
77.Sh FILES
78.Bl -tag -width /etc/group -compact
79.It Pa /etc/group
80.El
81.Sh SEE ALSO
82.Xr setgroups 2 ,
83.Xr initgroups 3 ,
84.Xr crypt 3 ,
85.Xr passwd 1 ,
86.Xr passwd 5
87.Sh BUGS
88The
89.Xr passwd 1
90command does not change the
91.Nm group
92passwords.
93.Sh HISTORY
94A
95.Nm
96file format appeared in
97.At v6 .
98