xref: /netbsd-src/share/man/man5/group.5 (revision ce0bb6e8d2e560ecacbe865a848624f94498063b)
1.\"	$NetBSD: group.5,v 1.3 1994/11/30 19:31:19 jtc Exp $
2.\"
3.\" Copyright (c) 1980, 1991, 1993
4.\"	The Regents of the University of California.  All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\" 3. All advertising materials mentioning features or use of this software
15.\"    must display the following acknowledgement:
16.\"	This product includes software developed by the University of
17.\"	California, Berkeley and its contributors.
18.\" 4. Neither the name of the University nor the names of its contributors
19.\"    may be used to endorse or promote products derived from this software
20.\"    without specific prior written permission.
21.\"
22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32.\" SUCH DAMAGE.
33.\"
34.\"     @(#)group.5	8.3 (Berkeley) 4/19/94
35.\"
36.Dd April 19, 1994
37.Dt GROUP 5
38.Os
39.Sh NAME
40.Nm group
41.Nd format of the group permissions file
42.Sh DESCRIPTION
43The file
44.Aq Pa /etc/group
45consists of newline separated
46.Tn ASCII
47records, one per group, containing four colon
48.Ql \&:
49separated fields. These fields are as follows:
50.Bl -tag -width password -offset indent -compact
51.It group
52Name of the group.
53.It passwd
54Group's
55.Em encrypted
56password.
57.It gid
58The group's decimal ID.
59.It member
60Group members.
61.El
62.Pp
63The
64.Ar group
65field is the group name used for granting file access to users
66who are members of the group.
67The
68.Ar gid
69field is the number associated with the group name.
70They should both be unique across the system (and often
71across a group of systems) since they control file access.
72The
73.Ar passwd
74field
75is an optional
76.Em encrypted
77password.
78This field is rarely used
79and an asterisk is normally placed in it rather than leaving it blank.
80The
81.Ar member
82field contains the names of users granted the privileges of
83.Ar group .
84The member names are separated by commas without spaces or newlines.
85A user is automatically in a group if that group was specified
86in their
87.Pa /etc/passwd
88entry and does not need to be added to that group in the
89.Pa /etc/group file.
90.\" .Pp
91.\" When the system reads the file
92.\" .Pa /etc/group
93.\" the fields are read into the structure
94.\" .Fa group
95.\" declared in
96.\" .Aq Pa grp.h :
97.\" .Bd -literal -offset indent
98.\" struct group {
99.\"	char    *gr_name;        /* group name */
100.\"	char    *gr_passwd;      /* group password */
101.\"	int     gr_gid;          /* group id */
102.\"	char    **gr_mem;        /* group members */
103.\" };
104.\" .Ed
105.Sh FILES
106.Bl -tag -width /etc/group -compact
107.It Pa /etc/group
108.El
109.Sh SEE ALSO
110.Xr setgroups 2 ,
111.Xr initgroups 3 ,
112.Xr crypt 3 ,
113.Xr passwd 1 ,
114.Xr passwd 5
115.Sh BUGS
116The
117.Xr passwd 1
118command does not change the
119.Nm group
120passwords.
121.Sh HISTORY
122A
123.Nm
124file format appeared in
125.At v6 .
126