LinuxCommandLibrary

grpck

verify integrity of group files

TLDR

Check group file integrity
$ sudo grpck
copy
Read-only mode
$ sudo grpck -r
copy
Sort by GID
$ sudo grpck -s
copy
Check specific files
$ sudo grpck [/etc/group] [/etc/gshadow]
copy

SYNOPSIS

grpck [options] [group] [shadow]

DESCRIPTION

grpck verifies the integrity of group information files. It checks for duplicate entries, valid field formats, and consistency between /etc/group and /etc/gshadow.
The tool can automatically fix some issues when run interactively. It is essential for maintaining system security and proper group functionality.

PARAMETERS

GROUP

Group file to check (default /etc/group).
SHADOW
Shadow group file (default /etc/gshadow).
-r
Read-only mode, report only.
-s
Sort entries by GID.
-R DIR
Chroot directory.
--help
Display help information.

CAVEATS

Requires root access. Interactive fixes need confirmation. Back up files before repair.

HISTORY

grpck was developed as part of the shadow password suite for Unix/Linux system administration.

SEE ALSO

pwck(8), groups(1), gpasswd(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard