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.
58
59       -s, --sort
60           Sort entries in /etc/group and /etc/gshadow by GID.
61
62       By default, grpck operates on /etc/group and /etc/gshadow. The user may
63       select alternate files with the group and shadow parameters.
64

CONFIGURATION

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

FILES

88       /etc/group
89           Group account information.
90
91       /etc/gshadow
92           Secure group account information.
93
94       /etc/passwd
95           User account information.
96

EXIT VALUES

98       The grpck command exits with the following values:
99
100       0
101           success
102
103       1
104           invalid command syntax
105
106       2
107           one or more bad group entries
108
109       3
110           can't open group files
111
112       4
113           can't lock group files
114
115       5
116           can't update group files
117

SEE ALSO

119       group(5), groupmod(8), gshadow(5), passwd(5), pwck(8), shadow(5).
120
121
122
123shadow-utils 4.6                  09/02/2019                          GRPCK(8)
Impressum