Name

grpck

Synopsis

grpck [option] [files]

System administration command. Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files. Generate warnings for other errors found. grpck will prompt for a “yes” or “no” before deleting entries. If the user replies “no,” the program will exit. If run in a read-only mode, the reply to all prompts is “no.” Alternate group and gshadow files can be checked. If other errors are found, the user will be encouraged to run the groupmod command.

Option

-r

Read-only mode.

-s

Sort entries by GID.

Exit codes

0

Success.

1

Syntax error.

2

One or more bad group entries found.

3

Could not open group files.

4

Could not lock group files.

5

Could not write group files.

Get Linux in a Nutshell, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.