]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man5/group.5
sysctl(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.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$
30 .\"
31 .Dd February 8, 2013
32 .Dt GROUP 5
33 .Os
34 .Sh NAME
35 .Nm group
36 .Nd format of the group permissions file
37 .Sh DESCRIPTION
38 The
39 .Nm
40 file is the local source of group information.
41 It can be used in conjunction with the Hesiod domain
42 `group', and the NIS maps `group.byname' and `group.bygid',
43 as controlled by
44 .Xr nsswitch.conf 5 .
45 .Pp
46 The file
47 .Nm
48 consists of newline separated
49 .Tn ASCII
50 records, one per group, containing four colon
51 .Ql \&:
52 separated fields.
53 These fields are as follows:
54 .Bl -tag -width password -offset indent -compact
55 .It group
56 Name of the group.
57 .It passwd
58 Group's
59 .Em encrypted
60 password.
61 .It gid
62 The group's decimal ID.
63 .It member
64 Group members.
65 .El
66 .Pp
67 Lines whose first non-whitespace character is a pound-sign (#)
68 are comments, and are ignored.
69 Blank lines that consist
70 only of spaces, tabs or newlines are also ignored.
71 .Pp
72 The
73 .Ar group
74 field is the group name used for granting file access to users
75 who are members of the group.
76 The
77 .Ar gid
78 field is the number associated with the group name.
79 They should both be unique across the system (and often
80 across a group of systems) since they control file access.
81 The
82 .Ar passwd
83 field
84 is an optional
85 .Em encrypted
86 password.
87 This field is rarely used
88 and an asterisk is normally placed in it rather than leaving it blank.
89 The
90 .Ar member
91 field contains the names of users granted the privileges of
92 .Ar group .
93 The member names are separated by commas without spaces or newlines.
94 A user is automatically in a group if that group was specified
95 in their
96 .Pa /etc/passwd
97 entry and does not need to be added to that group in the
98 .Nm
99 file.
100 .\" .Pp
101 .\" When the system reads the file
102 .\" .Pa /etc/group
103 .\" the fields are read into the structure
104 .\" .Fa group
105 .\" declared in
106 .\" .In grp.h :
107 .\" .Bd -literal -offset indent
108 .\" struct group {
109 .\"     char    *gr_name;        /* group name */
110 .\"     char    *gr_passwd;      /* group password */
111 .\"     int     gr_gid;          /* group id */
112 .\"     char    **gr_mem;        /* group members */
113 .\" };
114 .\" .Ed
115 .Sh IMPLEMENTATION NOTES
116 The
117 .Xr passwd 1
118 command does not change the
119 .Nm
120 passwords.
121 The
122 .Xr pw 8
123 utility's
124 .Cm groupmod
125 command should be used instead.
126 .Sh LIMITS
127 There are various limitations which are explained in
128 the function where they occur; see section
129 .Sx SEE ALSO .
130 .Pp
131 In older implementations,
132 a group cannot have more than 200 members.
133 The maximum line length of
134 .Pa /etc/group
135 is 1024 characters.
136 Longer lines will be skipped.
137 This limitation disappeared in
138 .Fx 3.0 .
139 Older binaries that are statically linked, depend on old
140 shared libraries, or
141 .No non- Ns Fx
142 binaries in compatibility mode
143 may still have this limit.
144 .Sh FILES
145 .Bl -tag -width /etc/group -compact
146 .It Pa /etc/group
147 .El
148 .Sh SEE ALSO
149 .Xr newgrp 1 ,
150 .Xr passwd 1 ,
151 .Xr setgroups 2 ,
152 .Xr crypt 3 ,
153 .Xr getgrent 3 ,
154 .Xr initgroups 3 ,
155 .Xr nsswitch.conf 5 ,
156 .Xr passwd 5 ,
157 .Xr chkgrp 8 ,
158 .Xr pw 8 ,
159 .Xr yp 8
160 .Sh HISTORY
161 A
162 .Nm
163 file format appeared in
164 .At v6 .
165 Support for comments first appeared in
166 .Fx 3.0 .