2007-10-07 17:17:33 +05:30
. \" Title: grpck
. \" Author:
. \" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
2007-10-07 17:17:57 +05:30
. \" Date: 07/30/2006
2007-10-07 17:17:33 +05:30
. \" Manual: System Management Commands
. \" Source: System Management Commands
. \"
2007-10-07 17:17:57 +05:30
.TH "GRPCK" "8" "07/30/2006" "System Management Commands" "System Management Commands"
2007-10-07 17:16:52 +05:30
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
2007-10-07 17:14:44 +05:30
grpck \- verify integrity of group files
2007-10-07 17:16:25 +05:30
.SH "SYNOPSIS"
.HP 6
\fB grpck\fR [\- r] [\fI group\fR \ \fI shadow\fR ]
.SH "DESCRIPTION"
.PP
2007-10-07 17:17:33 +05:30
2007-10-07 17:17:01 +05:30
\fB grpck\fR
verifies the integrity of the system authentication information. All entries in the
\fI /etc/group\fR
and
\fI /etc/gshadow\fR
2007-10-07 17:16:52 +05:30
are checked to see that the entry has the proper format and valid data in each field. The user is prompted to delete entries that are improperly formatted or which have other uncorrectable errors.
2007-10-07 17:15:23 +05:30
.PP
Checks are made to verify that each entry has:
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\(bu
the correct number of fields
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\(bu
a unique group name
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\(bu
a valid list of members and administrators
2007-10-07 17:17:33 +05:30
.sp
.RE
2007-10-07 17:15:23 +05:30
.PP
2007-10-07 17:17:01 +05:30
The checks for correct number of fields and unique group name are fatal. If the entry has the wrong number of fields, the user will be prompted to delete the entire line. If the user does not answer affirmatively, all further checks are bypassed. An entry with a duplicated group name is prompted for deletion, but the remaining checks will still be made. All other errors are warnings and the user is encouraged to run the
\fB groupmod\fR
2007-10-07 17:16:52 +05:30
command to correct the error.
2007-10-07 17:15:23 +05:30
.PP
2007-10-07 17:17:01 +05:30
The commands which operate on the
\fI /etc/group\fR
file are not able to alter corrupted or duplicated entries.
\fB grpck\fR
2007-10-07 17:16:52 +05:30
should be used in those circumstances to remove the offending entry.
2007-10-07 17:16:25 +05:30
.SH "OPTIONS"
.PP
2007-10-07 17:17:01 +05:30
By default,
\fB grpck\fR
operates on the files
\fI /etc/group\fR
and
\fI /etc/gshadow\fR . The user may select alternate files with the
\fI group\fR
and
\fI shadow\fR
parameters. Additionally, the user may execute the command in read\- only mode by specifying the
\fB \- r\fR
flag. This causes all questions regarding changes to be answered
\fI no\fR
without user intervention.
\fB grpck\fR
can also sort entries in
\fI /etc/group\fR
and
\fI /etc/gshadow\fR
by GID. To run it in sort mode pass it
\fB \- s\fR
2007-10-07 17:16:52 +05:30
flag. No checks are performed then, it just sorts.
2007-10-07 17:16:25 +05:30
.SH "FILES"
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI /etc/group\fR
2007-10-07 17:17:33 +05:30
Group account information.
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI /etc/gshadow\fR
2007-10-07 17:17:33 +05:30
Secure group account information.
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI /etc/passwd\fR
2007-10-07 17:17:33 +05:30
User account information.
2007-10-07 17:16:25 +05:30
.SH "SEE ALSO"
.PP
2007-10-07 17:17:33 +05:30
2007-10-07 17:17:01 +05:30
\fB group\fR (5),
\fB passwd\fR (5),
\fB shadow\fR (5),
\fB groupmod\fR (8).
2007-10-07 17:16:25 +05:30
.SH "EXIT VALUES"
.PP
2007-10-07 17:17:01 +05:30
The
\fB grpck\fR
command exits with the following values:
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 0\fR
success
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 1\fR
invalid command syntax
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 2\fR
one or more bad group entries
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 3\fR
can't open group files
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 4\fR
can't lock group files
2007-10-07 17:17:33 +05:30
.TP 3 n
2007-10-07 17:16:25 +05:30
\fI 5\fR
2007-10-07 17:16:52 +05:30
can't update group files
2007-10-07 17:17:11 +05:30