• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

grpck command – Remove corrupt or duplicate entries in the /etc/group and /etc/gshadow files.

by admin

The grpck command removes corrupt or duplicate entries in the /etc/group and /etc/gshadow files. It generates 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.

Syntax:

# grpck [option] [files]

Command Options

There are only 2 command options which you can use with this command.

Command option Description
-r Read only mode
-s Sort group id

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.

Examples of grpck Command

1. Verify the group account file:

# grpck /etc/group

2. Verify the shadow file:

# grpck /etc/gshadow

Filed Under: Linux

Some more articles you might also be interested in …

  1. apt: command not found
  2. virt-manager Command Examples in Linux
  3. How to Mount Guest Qcow2 Virtual disk Image containing LVM on KVM Host Machine
  4. How to change the path of the auditd log file /var/log/audit/audit.log
  5. resize2fs: commnd not found
  6. How to control resource (cgroup) with systemd for user process group in CentOS/RHEL 7
  7. “Authorization not available. Check if polkit service is running or see debug message for more information” – CentOS/RHEL 7 ssh service error
  8. arping: Discover and probe hosts in a network using the ARP protocol (Command Examples)
  9. binwalk Command Examples in Linux
  10. How To Open A Port In CentOS / RHEL 7

You May Also Like

Primary Sidebar

Recent Posts

  • aws ec2: CLI for AWS EC2 (Command Examples)
  • aws cur – Create, query, and delete AWS usage report definitions (Command Examples)
  • aws configure – Manage configuration for the AWS CLI (Command Examples)
  • aws cognito-idp: Manage Amazon Cognito user pool and its users and groups using the CLI

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright