{
    "content": [
        {
            "type": "text",
            "text": "# GRPCK (info)\n\n## NAME\n\ngrpck - verify integrity of group files\n\n## SYNOPSIS\n\ngrpck [options] [group [ shadow ]]\n\n## DESCRIPTION\n\nThe grpck command verifies the integrity of the groups information. It\nchecks that all entries in /etc/group and /etc/gshadow have the proper\nformat and contain valid data. The user is prompted to delete entries\nthat are improperly formatted or which have other uncorrectable errors.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (3 subsections)\n- **CONFIGURATION**\n- **FILES**\n- **EXIT VALUES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "GRPCK",
        "section": "",
        "mode": "info",
        "summary": "grpck - verify integrity of group files",
        "synopsis": "grpck [options] [group [ shadow ]]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Display help message and exit."
            },
            {
                "flag": "-r",
                "long": "--read-only",
                "arg": null,
                "description": "Execute the grpck command in read-only mode. This causes all questions regarding changes to be answered no without user intervention. -R, --root CHROOTDIR Apply changes in the CHROOTDIR directory and use the configuration files from the CHROOTDIR directory."
            },
            {
                "flag": "-s",
                "long": "--sort",
                "arg": null,
                "description": "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."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "group",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/group/5/json"
            },
            {
                "name": "groupmod",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/groupmod/8/json"
            },
            {
                "name": "gshadow",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/gshadow/5/json"
            },
            {
                "name": "passwd",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/passwd/5/json"
            },
            {
                "name": "pwck",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/pwck/8/json"
            },
            {
                "name": "shadow",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/shadow/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 30,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-r, --read-only",
                        "lines": 8,
                        "flag": "-r",
                        "long": "--read-only"
                    },
                    {
                        "name": "-s, --sort",
                        "lines": 5,
                        "flag": "-s",
                        "long": "--sort"
                    }
                ]
            },
            {
                "name": "CONFIGURATION",
                "lines": 21,
                "subsections": []
            },
            {
                "name": "FILES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "EXIT VALUES",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "grpck - verify integrity of group files\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "grpck [options] [group [ shadow ]]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The grpck command verifies the integrity of the groups information. It\nchecks that all entries in /etc/group and /etc/gshadow have the proper\nformat and contain valid data. The user is prompted to delete entries\nthat are improperly formatted or which have other uncorrectable errors.\n\nChecks are made to verify that each entry has:\n\no   the correct number of fields\n\no   a unique and valid group name\n\no   a valid group identifier (/etc/group only)\n\no   a valid list of members and administrators\n\no   a corresponding entry in the /etc/gshadow file (respectively\n/etc/group for the gshadow checks)\n\nThe checks for correct number of fields and unique group name are\nfatal. If an entry has the wrong number of fields, the user will be\nprompted to delete the entire line. If the user does not answer\naffirmatively, all further checks are bypassed. An entry with a\nduplicated group name is prompted for deletion, but the remaining\nchecks will still be made. All other errors are warnings and the user\nis encouraged to run the groupmod command to correct the error.\n\nThe commands which operate on the /etc/group and /etc/gshadow files are\nnot able to alter corrupted or duplicated entries.  grpck should be\nused in those circumstances to remove the offending entries.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "The -r and -s options cannot be combined.\n\nThe options which apply to the grpck command are:\n",
                "subsections": [
                    {
                        "name": "-h, --help",
                        "content": "Display help message and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "-r, --read-only",
                        "content": "Execute the grpck command in read-only mode. This causes all\nquestions regarding changes to be answered no without user\nintervention.\n\n-R, --root CHROOTDIR\nApply changes in the CHROOTDIR directory and use the configuration\nfiles from the CHROOTDIR directory.\n",
                        "flag": "-r",
                        "long": "--read-only"
                    },
                    {
                        "name": "-s, --sort",
                        "content": "Sort entries in /etc/group and /etc/gshadow by GID.\n\nBy default, grpck operates on /etc/group and /etc/gshadow. The user may\nselect alternate files with the group and shadow parameters.\n",
                        "flag": "-s",
                        "long": "--sort"
                    }
                ]
            },
            "CONFIGURATION": {
                "content": "The following configuration variables in /etc/login.defs change the\nbehavior of this tool:\n\nMAXMEMBERSPERGROUP (number)\nMaximum members per group entry. When the maximum is reached, a new\ngroup entry (line) is started in /etc/group (with the same name,\nsame password, and same GID).\n\nThe default value is 0, meaning that there are no limits in the\nnumber of members in a group.\n\nThis feature (split group) permits to limit the length of lines in\nthe group file. This is useful to make sure that lines for NIS\ngroups are not larger than 1024 characters.\n\nIf you need to enforce such limit, you can use 25.\n\nNote: split groups may not be supported by all tools (even in the\nShadow toolsuite). You should not use this variable unless you\nreally need it.\n",
                "subsections": []
            },
            "FILES": {
                "content": "/etc/group\nGroup account information.\n\n/etc/gshadow\nSecure group account information.\n\n/etc/passwd\nUser account information.\n",
                "subsections": []
            },
            "EXIT VALUES": {
                "content": "The grpck command exits with the following values:\n\n0\nsuccess\n\n1\ninvalid command syntax\n\n2\none or more bad group entries\n\n3\ncan't open group files\n\n4\ncan't lock group files\n\n5\ncan't update group files\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "group(5), groupmod(8), gshadow(5), passwd(5), pwck(8), shadow(5).\n\nshadow-utils 4.8.1                02/06/2024                          GRPCK(8)",
                "subsections": []
            }
        }
    }
}