GRPCK(8)
๐ NAME ๐
okay so bestie, welcome to grpck โ she's section 8 of the System Management Commands, and her whole job is: verify integrity of group files. that's it. that's the job. she checks the group files and makes sure nobody's out here lying. ๐
โจ SYNOPSIS โจ
grpck [options] [group [ shadow ]]
๐ฆ DESCRIPTION ๐ฆ
so grpck verifies the integrity of the groups information, fr fr. she checks that every single entry in /etc/group and /etc/gshadow has the proper format and contains valid data. and if something's formatted wrong, or has some other uncorrectable error? she literally asks the user if they wanna delete that entry. girl is not subtle. ๐ซถ
here's the vibe check she runs on every entry:
- the correct number of fields
- a unique and valid group name
- a valid group identifier (
/etc/grouponly) - a valid list of members and administrators
- a corresponding entry in the
/etc/gshadowfile (respectively/etc/groupfor the gshadow checks)
now here's the important part, don't skip this: the checks for correct number of fields and unique group name are fatal. ๐
- if an entry has the wrong number of fields, the user gets prompted to delete the entire line. and if the user does not answer affirmatively? all further checks are bypassed. like, she's done. she's leaving.
- an entry with a duplicated group name gets prompted for deletion too, but the remaining checks will still be made.
- every other error is just a warning, and the user is encouraged to run the
groupmodcommand to correct the error.
and one more thing: the commands which operate on the /etc/group and /etc/gshadow files are not able to alter corrupted or duplicated entries. so when you're in that situation, that's exactly when grpck should be used โ to remove the offending entries. she's the cleanup crew, the main character energy, the one who handles what the others can't. ๐
๐ OPTIONS ๐
the-rand-soptions cannot be combined. pick a lane bestie.
the options which apply to the grpck command are:
-h,--helpโ display help message and exit. iconic. she tells you about herself.-r,--read-onlyโ execute thegrpckcommand in read-only mode. this causes all questions regarding changes to be answered no without user intervention. she's just looking, not touching. ๐-R,--rootCHROOT_DIR โ apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory. only absolute paths are supported. no SELINUX support.-s,--sortโ sort entries in/etc/groupand/etc/gshadowby GID. organize her. ๐ง-S,--silence-warningsโ suppress more controversial warnings, in particular warnings about inconsistency between group members listed in/etc/groupand/etc/ghadow. shhh. ๐คซ
by default, grpck operates on /etc/group and /etc/gshadow. the user may select alternate files with the group and shadow parameters. so yes, you can point her somewhere else, she's flexible like that. ๐
๐ CONFIGURATION ๐
the following configuration variables in /etc/login.defs change the behavior of this tool:
MAX_MEMBERS_PER_GROUP (number)
maximum members per group entry. when the maximum is reached, a new group entry (line) is started in /etc/group (with the same name, same password, and same GID).
the default value is 0, meaning that there are no limits in the number of members in a group.
this feature (split group) permits to limit the length of lines in the group file. this is useful to make sure that lines for NIS groups are not larger than 1024 characters.
if you need to enforce such limit, you can use 25.
note: split groups may not be supported by all tools (even in the Shadow toolsuite). you should not use this variable unless you really need it. not me warning you twice but like, she said what she said. ๐
๐ธ FILES ๐ธ
/etc/groupโ group account information./etc/gshadowโ secure group account information./etc/passwdโ user account information.
โญ EXIT VALUES โญ
the grpck command exits with the following values:
0โ success. ate. no notes. ๐ฅ1โ invalid command syntax2โ one or more bad group entries3โ can't open group files4โ can't lock group files5โ can't update group files
๐ SEE ALSO ๐
group(5), groupmod(8), gshadow(5), passwd(5), pwck(8), shadow(5).
okay bestie that's the whole page, you're so welcome, go verify some group files. ๐
โจ this was shadow-utils 4.20.0, dated 07/30/2026, and yeah she's still GRPCK(8) โ same girl, same section, periodt. ๐๐ฆ
๐ฆ where this page comes from
- arch rolling: shadow 4.20.0.arch1-1 ยท 0BSD AND BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms