126 lines
2.9 KiB
Groff
126 lines
2.9 KiB
Groff
.\" ** You probably do not want to edit this file directly **
|
|
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
|
|
.\" Instead of manually editing it, you probably should edit the DocBook XML
|
|
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
|
|
.TH "PWCK" "8" "12/02/2005" "System Management Commands" "System Management Commands"
|
|
.\" disable hyphenation
|
|
.nh
|
|
.\" disable justification (adjust text to left margin only)
|
|
.ad l
|
|
.SH "NAME"
|
|
pwck \- verify integrity of password files
|
|
.SH "SYNOPSIS"
|
|
.HP 5
|
|
\fBpwck\fR [\-q] [\-s] [\fIpasswd\fR\ \fIshadow\fR]
|
|
.HP 5
|
|
\fBpwck\fR [\-q] [\-r] [\fIpasswd\fR\ \fIshadow\fR]
|
|
.SH "DESCRIPTION"
|
|
.PP
|
|
\fBpwck\fR
|
|
verifies the integrity of the system authentication information. All entries in the
|
|
\fI/etc/passwd\fR
|
|
and
|
|
\fI/etc/shadow\fR
|
|
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.
|
|
.PP
|
|
Checks are made to verify that each entry has:
|
|
.TP 3
|
|
\(bu
|
|
the correct number of fields
|
|
.TP
|
|
\(bu
|
|
a unique user name
|
|
.TP
|
|
\(bu
|
|
a valid user and group identifier
|
|
.TP
|
|
\(bu
|
|
a valid primary group
|
|
.TP
|
|
\(bu
|
|
a valid home directory
|
|
.TP
|
|
\(bu
|
|
a valid login shell
|
|
.PP
|
|
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
|
|
\fBusermod\fR
|
|
command to correct the error.
|
|
.PP
|
|
The commands which operate on the
|
|
\fI/etc/passwd\fR
|
|
file are not able to alter corrupted or duplicated entries.
|
|
\fBpwck\fR
|
|
should be used in those circumstances to remove the offending entry.
|
|
.SH "OPTIONS"
|
|
.PP
|
|
The options which apply to the
|
|
\fBpwck\fR
|
|
command are:
|
|
.TP
|
|
\fB\-q\fR
|
|
Report errors only. The warnings which do not require any action from the user won't be displayed.
|
|
.TP
|
|
\fB\-r\fR
|
|
Execute the
|
|
\fBpwck\fR
|
|
command in read\-only mode.
|
|
.TP
|
|
\fB\-s\fR
|
|
Sort entries in
|
|
\fI/etc/passwd\fR
|
|
and
|
|
\fI/etc/shadow\fR
|
|
by UID.
|
|
.PP
|
|
By default,
|
|
\fBpwck\fR
|
|
operates on the files
|
|
\fI/etc/passwd\fR
|
|
and
|
|
\fI/etc/shadow\fR. The user may select alternate files with the
|
|
\fIpasswd\fR
|
|
and
|
|
\fIshadow\fR
|
|
parameters.
|
|
.SH "FILES"
|
|
.TP
|
|
\fI/etc/group\fR
|
|
group account information
|
|
.TP
|
|
\fI/etc/passwd\fR
|
|
user account information
|
|
.TP
|
|
\fI/etc/shadow\fR
|
|
secure user account information
|
|
.SH "SEE ALSO"
|
|
.PP
|
|
\fBgroup\fR(5),
|
|
\fBpasswd\fR(5),
|
|
\fBshadow\fR(5),
|
|
\fBusermod\fR(8).
|
|
.SH "EXIT VALUES"
|
|
.PP
|
|
The
|
|
\fBpwck\fR
|
|
command exits with the following values:
|
|
.TP
|
|
\fI0\fR
|
|
success
|
|
.TP
|
|
\fI1\fR
|
|
invalid command syntax
|
|
.TP
|
|
\fI2\fR
|
|
one or more bad password entries
|
|
.TP
|
|
\fI3\fR
|
|
can't open password files
|
|
.TP
|
|
\fI4\fR
|
|
can't lock password files
|
|
.TP
|
|
\fI5\fR
|
|
can't update password files
|
|
|