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