← 返回命令列表

Linux command

grpck 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Check group file integrity

sudo grpck

Read-only mode

sudo grpck -r

Sort by GID

sudo grpck -s

Check specific files

sudo grpck [/etc/group] [/etc/gshadow]

说明

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.

参数

-r
Read-only mode, report only.
-s
Sort entries by GID.
-R _DIR_
Chroot directory.
--help
Display help information.

FAQ

What is the grpck command used for?

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.

How do I run a basic grpck example?

Run `sudo grpck` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r do in grpck?

Read-only mode, report only.