2007-10-07 11:47:33 +00:00
. \" Title: pwck
. \" Author:
. \" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
2007-10-07 11:47:57 +00:00
. \" Date: 07/30/2006
2007-10-07 11:47:33 +00:00
. \" Manual: System Management Commands
. \" Source: System Management Commands
. \"
2007-10-07 11:47:57 +00:00
.TH "PWCK" "8" "07/30/2006" "System Management Commands" "System Management Commands"
2007-10-07 11:46:52 +00:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
2007-10-07 11:46:25 +00:00
pwck \- verify integrity of password files
.SH "SYNOPSIS"
.HP 5
2007-10-07 11:46:34 +00:00
\fB pwck\fR [\- q] [\- s] [\fI passwd\fR \ \fI shadow\fR ]
.HP 5
2007-10-07 11:47:11 +00:00
\fB pwck\fR [\- q] [\- r] [\fI passwd\fR \ \fI shadow\fR ]
2007-10-07 11:46:25 +00:00
.SH "DESCRIPTION"
.PP
2007-10-07 11:47:33 +00:00
2007-10-07 11:47:01 +00:00
\fB pwck\fR
verifies the integrity of the system authentication information. All entries in the
\fI /etc/passwd\fR
and
\fI /etc/shadow\fR
2007-10-07 11:46:52 +00:00
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 11:46:25 +00:00
.PP
Checks are made to verify that each entry has:
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
the correct number of fields
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
a unique user name
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
a valid user and group identifier
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
a valid primary group
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
a valid home directory
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\(bu
a valid login shell
2007-10-07 11:47:33 +00:00
.sp
.RE
2007-10-07 11:46:25 +00:00
.PP
2007-10-07 11:47:01 +00:00
The checks for correct number of fields and unique user 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 user name is prompted for deletion, but the remaining checks will still be made. All other errors are warning and the user is encouraged to run the
\fB usermod\fR
2007-10-07 11:46:52 +00:00
command to correct the error.
2007-10-07 11:46:25 +00:00
.PP
2007-10-07 11:47:01 +00:00
The commands which operate on the
\fI /etc/passwd\fR
file are not able to alter corrupted or duplicated entries.
\fB pwck\fR
2007-10-07 11:46:52 +00:00
should be used in those circumstances to remove the offending entry.
2007-10-07 11:46:25 +00:00
.SH "OPTIONS"
.PP
2007-10-07 11:47:01 +00:00
The options which apply to the
\fB pwck\fR
2007-10-07 11:46:52 +00:00
command are:
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:34 +00:00
\fB \- q\fR
2007-10-07 11:47:11 +00:00
Report errors only. The warnings which do not require any action from the user won't be displayed.
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:34 +00:00
\fB \- r\fR
2007-10-07 11:47:01 +00:00
Execute the
\fB pwck\fR
2007-10-07 11:46:52 +00:00
command in read\- only mode.
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:34 +00:00
\fB \- s\fR
2007-10-07 11:47:01 +00:00
Sort entries in
\fI /etc/passwd\fR
and
\fI /etc/shadow\fR
2007-10-07 11:46:52 +00:00
by UID.
2007-10-07 11:46:34 +00:00
.PP
2007-10-07 11:47:01 +00:00
By default,
\fB pwck\fR
operates on the files
\fI /etc/passwd\fR
and
\fI /etc/shadow\fR . The user may select alternate files with the
\fI passwd\fR
and
\fI shadow\fR
2007-10-07 11:46:52 +00:00
parameters.
2007-10-07 11:46:25 +00:00
.SH "FILES"
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI /etc/group\fR
2007-10-07 11:47:33 +00:00
Group account information.
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI /etc/passwd\fR
2007-10-07 11:47:33 +00:00
User account information.
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI /etc/shadow\fR
2007-10-07 11:47:33 +00:00
Secure user account information.
2007-10-07 11:46:25 +00:00
.SH "SEE ALSO"
.PP
2007-10-07 11:47:01 +00:00
\fB group\fR (5),
\fB passwd\fR (5),
\fB shadow\fR (5),
\fB usermod\fR (8).
2007-10-07 11:46:25 +00:00
.SH "EXIT VALUES"
.PP
2007-10-07 11:47:01 +00:00
The
\fB pwck\fR
command exits with the following values:
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 0\fR
success
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 1\fR
invalid command syntax
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 2\fR
one or more bad password entries
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 3\fR
can't open password files
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 4\fR
can't lock password files
2007-10-07 11:47:33 +00:00
.TP 3 n
2007-10-07 11:46:25 +00:00
\fI 5\fR
2007-10-07 11:46:52 +00:00
can't update password files
2007-10-07 11:47:11 +00:00