Linux "grpck" Command Line Options and Examples
verify integrity of group files

The grpck command verifies the integrity of the groups information. It checks that all entries in /etc/group and /etc/gshadow have the proper format and contain valid data. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.


grpck [options] [group [ shadow ]]

Command Line Options:

Display help message and exit.
grpck -h ...
Execute the grpck command in read-only mode. This causes all questions regarding changes to be answered no without userintervention.
grpck -r ...
Apply changes in the CHROOT_DIR directory and use the configuration files from the CHROOT_DIR directory.
grpck -R ...
Sort entries in /etc/group and /etc/gshadow by GID.By default, grpck operates on /etc/group and /etc/gshadow. The user may select alternate files with the group and shadow parameters.CONFIGURATIONThe 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 samename, 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 NISgroups 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 youreally need it.FILES/etc/groupGroup account information./etc/gshadowSecure group account information./etc/passwdUser account information.EXIT VALUESThe grpck command exits with the following values:0success1invalid command syntax2one or more bad group entries3can't open group files4can't lock group files5can't update group files
grpck -s ...