105 lines
4.1 KiB
Groff
105 lines
4.1 KiB
Groff
.\"$Id: pwck.8,v 1.18 2005/04/12 17:55:55 kloczek Exp $
|
|
.\" Copyright 1992, Julianne Frances Haugh
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. Neither the name of Julianne F. Haugh nor the names of its contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY JULIE HAUGH AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL JULIE HAUGH OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.TH PWCK 8
|
|
.SH NAME
|
|
pwck \- verify integrity of password files
|
|
.SH SYNOPSIS
|
|
\fBpwck\fR [\fB\-sr\fR] [\fIpasswd\fR \fIshadow\fR]
|
|
.SH DESCRIPTION
|
|
\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.
|
|
.P
|
|
Checks are made to verify that each entry has
|
|
.sp
|
|
.in +.5i
|
|
\- the correct number of fields
|
|
.br
|
|
\- a unique user name
|
|
.br
|
|
\- a valid user and group identifier
|
|
.br
|
|
\- a valid primary group
|
|
.br
|
|
\- a valid home directory
|
|
.br
|
|
\- a valid login shell
|
|
.in \-.5i
|
|
.sp
|
|
.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
|
|
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. 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 \fBno\fR without user intervention.
|
|
\fBpwck\fR can also sort entries in \fI/etc/passwd\fR and \fI/etc/shadow\fR
|
|
by UID. To run it in sort mode pass it \fB\-s\fR flag. No checks are
|
|
performed then, it just sorts.
|
|
.SH FILES
|
|
\fI/etc/passwd\fR \- user account information
|
|
.br
|
|
\fI/etc/shadow\fR \- secure user account information
|
|
.br
|
|
\fI/etc/group\fR \- group account information
|
|
.SH SEE ALSO
|
|
.BR group (5),
|
|
.BR passwd (5),
|
|
.BR shadow (5),
|
|
.BR usermod (8)
|
|
.SH EXIT VALUES
|
|
.TP 2
|
|
The \fBpwck\fR command exits with the following values:
|
|
\fB0\fR \- success
|
|
.br
|
|
\fB1\fR \- invalid command syntax
|
|
.br
|
|
\fB2\fR \- one or more bad password entries
|
|
.br
|
|
\fB3\fR \- can't open password files
|
|
.br
|
|
\fB4\fR \- can't lock password files
|
|
.br
|
|
\fB5\fR \- can't update password files
|
|
.SH AUTHOR
|
|
Julianne Frances Haugh (jockgrrl@ix.netcom.com)
|