1GRPCK(8) System Management Commands GRPCK(8)
2
3
4
6 grpck - verify integrity of group files
7
9 grpck [options] [group [ shadow ]]
10
12 The grpck command verifies the integrity of the groups information. It
13 checks that all entries in /etc/group and /etc/gshadow have the proper
14 format and contain valid data. The user is prompted to delete entries
15 that are improperly formatted or which have other uncorrectable errors.
16
17 Checks are made to verify that each entry has:
18
19 • the correct number of fields
20
21 • a unique and valid group name
22
23 • a valid group identifier (/etc/group only)
24
25 • a valid list of members and administrators
26
27 • a corresponding entry in the /etc/gshadow file (respectively
28 /etc/group for the gshadow checks)
29
30 The checks for correct number of fields and unique group name are
31 fatal. If an entry has the wrong number of fields, the user will be
32 prompted to delete the entire line. If the user does not answer
33 affirmatively, all further checks are bypassed. An entry with a
34 duplicated group name is prompted for deletion, but the remaining
35 checks will still be made. All other errors are warnings and the user
36 is encouraged to run the groupmod command to correct the error.
37
38 The commands which operate on the /etc/group and /etc/gshadow files are
39 not able to alter corrupted or duplicated entries. grpck should be
40 used in those circumstances to remove the offending entries.
41
43 The -r and -s options cannot be combined.
44
45 The options which apply to the grpck command are:
46
47 -h, --help
48 Display help message and exit.
49
50 -r, --read-only
51 Execute the grpck command in read-only mode. This causes all
52 questions regarding changes to be answered no without user
53 intervention.
54
55 -R, --root CHROOT_DIR
56 Apply changes in the CHROOT_DIR directory and use the configuration
57 files from the CHROOT_DIR directory.
58
59 -s, --sort
60 Sort entries in /etc/group and /etc/gshadow by GID.
61
62 -S, --silence-warnings
63 Suppress more controversial warnings, in particular warnings about
64 inconsistency between group members listed in /etc/group and
65 /etc/ghadow.
66
67 By default, grpck operates on /etc/group and /etc/gshadow. The user may
68 select alternate files with the group and shadow parameters.
69
71 The following configuration variables in /etc/login.defs change the
72 behavior of this tool:
73
74 MAX_MEMBERS_PER_GROUP (number)
75 Maximum members per group entry. When the maximum is reached, a new
76 group entry (line) is started in /etc/group (with the same name,
77 same password, and same GID).
78
79 The default value is 0, meaning that there are no limits in the
80 number of members in a group.
81
82 This feature (split group) permits to limit the length of lines in
83 the group file. This is useful to make sure that lines for NIS
84 groups are not larger than 1024 characters.
85
86 If you need to enforce such limit, you can use 25.
87
88 Note: split groups may not be supported by all tools (even in the
89 Shadow toolsuite). You should not use this variable unless you
90 really need it.
91
93 /etc/group
94 Group account information.
95
96 /etc/gshadow
97 Secure group account information.
98
99 /etc/passwd
100 User account information.
101
103 The grpck command exits with the following values:
104
105 0
106 success
107
108 1
109 invalid command syntax
110
111 2
112 one or more bad group entries
113
114 3
115 can't open group files
116
117 4
118 can't lock group files
119
120 5
121 can't update group files
122
124 group(5), groupmod(8), gshadow(5), passwd(5), pwck(8), shadow(5).
125
126
127
128shadow-utils 4.11.1 02/10/2022 GRPCK(8)