1GRPCK(8)                  System Management Commands                  GRPCK(8)
2
3
4

NAME

6       grpck - verify integrity of group files
7

SYNOPSIS

9       grpck [options] [group [ shadow ]]
10

DESCRIPTION

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

OPTIONS

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. Only absolute paths are
58           supported.
59
60       -s, --sort
61           Sort entries in /etc/group and /etc/gshadow by GID.
62
63       -S, --silence-warnings
64           Suppress more controversial warnings, in particular warnings about
65           inconsistency between group members listed in /etc/group and
66           /etc/ghadow.
67
68       By default, grpck operates on /etc/group and /etc/gshadow. The user may
69       select alternate files with the group and shadow parameters.
70

CONFIGURATION

72       The following configuration variables in /etc/login.defs change the
73       behavior of this tool:
74
75       MAX_MEMBERS_PER_GROUP (number)
76           Maximum members per group entry. When the maximum is reached, a new
77           group entry (line) is started in /etc/group (with the same name,
78           same password, and same GID).
79
80           The default value is 0, meaning that there are no limits in the
81           number of members in a group.
82
83           This feature (split group) permits to limit the length of lines in
84           the group file. This is useful to make sure that lines for NIS
85           groups are not larger than 1024 characters.
86
87           If you need to enforce such limit, you can use 25.
88
89           Note: split groups may not be supported by all tools (even in the
90           Shadow toolsuite). You should not use this variable unless you
91           really need it.
92

FILES

94       /etc/group
95           Group account information.
96
97       /etc/gshadow
98           Secure group account information.
99
100       /etc/passwd
101           User account information.
102

EXIT VALUES

104       The grpck command exits with the following values:
105
106       0
107           success
108
109       1
110           invalid command syntax
111
112       2
113           one or more bad group entries
114
115       3
116           can't open group files
117
118       4
119           can't lock group files
120
121       5
122           can't update group files
123

SEE ALSO

125       group(5), groupmod(8), gshadow(5), passwd(5), pwck(8), shadow(5).
126
127
128
129shadow-utils 4.14.0               10/03/2023                          GRPCK(8)
Impressum