---
name: "chkgrp"
section: "8"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/chkgrp"
---

# chkgrp(8)

check the syntax of the group file

## NAME

**chkgrp** – check the syntax of the group file

## SYNOPSIS

**chkgrp** \[**-q**\] \[*groupfile*\]

## DESCRIPTION

The **chkgrp** utility scans the given file or, failing that, the system-wide group file for errors. Specifically, it checks that every non-blank, non-comment entry is composed of four colon-separated fields, that none of them contains whitespace, and that the third field (the group ID) is numeric. It will also check for invalid characters in the group names and group members. The following options are available:

- **-q**

  This option disables printing of text when the group format is correct.

## FILES

- */etc/group*

  group database file

## EXIT STATUS

The **chkgrp** utility returns EX\_DATAERR if errors were found in the group file, and EX\_OK otherwise.

## DIAGNOSTICS

For each error found, **chkgrp** will print an error message containing the name of the file being scanned and the line number on which the error was found.

## SEE ALSO

[getgrent(3)](/getgrent/3.md), [group(5)](/group/5.md), [groups(7)](/groups/7.md)

## HISTORY

The **chkgrp** utility appeared in FreeBSD 3.0.

## AUTHORS

The **chkgrp** utility and this manual page were written by Dag-Erling Smørgrav ⟨*des@FreeBSD.org*⟩. Further functionality was added by Liam J. Foy ⟨*liamfoy@dragonflybsd.org*⟩.

## BUGS

Should check the range of the group ID.
