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