2007-10-07 17:16:16 +05:30
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
|
|
|
|
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
|
|
|
|
<refentry id='pwck.8'>
|
2007-10-07 17:17:11 +05:30
|
|
|
<!-- $Id: pwck.8.xml,v 1.16 2005/12/02 22:20:23 kloczek Exp $ -->
|
2007-10-07 17:16:16 +05:30
|
|
|
<refmeta>
|
|
|
|
<refentrytitle>pwck</refentrytitle>
|
|
|
|
<manvolnum>8</manvolnum>
|
2007-10-07 17:17:11 +05:30
|
|
|
<refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
|
2007-10-07 17:16:16 +05:30
|
|
|
</refmeta>
|
|
|
|
<refnamediv id='name'>
|
|
|
|
<refname>pwck</refname>
|
|
|
|
<refpurpose>verify integrity of password files</refpurpose>
|
|
|
|
</refnamediv>
|
|
|
|
<!-- body begins here -->
|
|
|
|
<refsynopsisdiv id='synopsis'>
|
|
|
|
<cmdsynopsis>
|
2007-10-07 17:16:25 +05:30
|
|
|
<command>pwck</command>
|
2007-10-07 17:16:34 +05:30
|
|
|
<arg choice='opt'>-q </arg>
|
|
|
|
<arg choice='opt'>-s </arg>
|
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>
|
|
|
|
<replaceable>passwd</replaceable>
|
|
|
|
</arg>
|
|
|
|
<arg choice='plain'>
|
|
|
|
<replaceable>shadow</replaceable>
|
|
|
|
</arg>
|
2007-10-07 17:16:34 +05:30
|
|
|
</arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
<cmdsynopsis>
|
|
|
|
<command>pwck</command>
|
2007-10-07 17:17:11 +05:30
|
|
|
<arg choice='opt'>-q </arg>
|
2007-10-07 17:16:34 +05:30
|
|
|
<arg choice='opt'>-r </arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
<arg choice='opt'>
|
2007-10-07 17:17:01 +05:30
|
|
|
<arg choice='plain'>
|
|
|
|
<replaceable>passwd</replaceable>
|
|
|
|
</arg>
|
|
|
|
<arg choice='plain'>
|
|
|
|
<replaceable>shadow</replaceable>
|
|
|
|
</arg>
|
2007-10-07 17:16:16 +05:30
|
|
|
</arg>
|
|
|
|
</cmdsynopsis>
|
|
|
|
</refsynopsisdiv>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='description'>
|
|
|
|
<title>DESCRIPTION</title>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>
|
|
|
|
<command>pwck</command> verifies the integrity of the system
|
2007-10-07 17:16:25 +05:30
|
|
|
authentication information. All entries in the
|
2007-10-07 17:16:16 +05:30
|
|
|
<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename>
|
|
|
|
are checked to see that the entry has the proper format and valid data
|
2007-10-07 17:16:25 +05:30
|
|
|
in each field. The user is prompted to delete entries that are
|
2007-10-07 17:16:16 +05:30
|
|
|
improperly formatted or which have other uncorrectable errors.
|
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:25 +05:30
|
|
|
<para>Checks are made to verify that each entry has:</para>
|
|
|
|
<itemizedlist mark='bullet'>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>the correct number of fields</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>a unique user name</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>a valid user and group identifier</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>a valid primary group</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para> a valid home directory</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
<listitem>
|
2007-10-07 17:17:01 +05:30
|
|
|
<para>a valid login shell</para>
|
2007-10-07 17:16:25 +05:30
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<para>
|
|
|
|
The checks for correct number of fields and unique user name are
|
2007-10-07 17:16:16 +05:30
|
|
|
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
|
2007-10-07 17:16:25 +05:30
|
|
|
is encouraged to run the <command>usermod</command> command to correct
|
2007-10-07 17:16:16 +05:30
|
|
|
the error.
|
|
|
|
</para>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
|
|
|
<para>
|
|
|
|
The commands which operate on the <filename>/etc/passwd</filename>
|
|
|
|
file are not able to alter corrupted or duplicated entries.
|
|
|
|
<command>pwck</command> should be used in those circumstances to
|
|
|
|
remove the offending entry.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='options'>
|
|
|
|
<title>OPTIONS</title>
|
2007-10-07 17:16:34 +05:30
|
|
|
<para>
|
|
|
|
The options which apply to the <command>pwck</command> command are:
|
|
|
|
</para>
|
|
|
|
<variablelist remap='IP'>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-q</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:17:11 +05:30
|
|
|
Report errors only. The warnings which do not require any
|
|
|
|
action from the user won't be displayed.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:34 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-r</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:16:34 +05:30
|
|
|
Execute the <command>pwck</command> command in read-only mode.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:34 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term>
|
|
|
|
<option>-s</option>
|
|
|
|
</term>
|
|
|
|
<listitem>
|
|
|
|
<para>
|
2007-10-07 17:16:34 +05:30
|
|
|
Sort entries in <filename>/etc/passwd</filename> and
|
|
|
|
<filename>/etc/shadow</filename> by UID.
|
2007-10-07 17:17:01 +05:30
|
|
|
</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:34 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<para>
|
|
|
|
By default, <command>pwck</command> operates on the files
|
2007-10-07 17:17:01 +05:30
|
|
|
<filename>/etc/passwd</filename> and <filename>/etc/shadow</filename>.
|
2007-10-07 17:16:16 +05:30
|
|
|
The user may select alternate files with the <emphasis
|
|
|
|
remap='I'>passwd</emphasis> and <emphasis remap='I'>shadow</emphasis>
|
2007-10-07 17:16:34 +05:30
|
|
|
parameters.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='files'>
|
|
|
|
<title>FILES</title>
|
|
|
|
<variablelist>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/group</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>group account information</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/passwd</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>user account information</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<term><filename>/etc/shadow</filename></term>
|
|
|
|
<listitem>
|
|
|
|
<para>secure user account information</para>
|
|
|
|
</listitem>
|
2007-10-07 17:16:16 +05:30
|
|
|
</varlistentry>
|
|
|
|
</variablelist>
|
|
|
|
</refsect1>
|
2007-10-07 17:17:01 +05:30
|
|
|
|
2007-10-07 17:16:16 +05:30
|
|
|
<refsect1 id='see_also'>
|
|
|
|
<title>SEE ALSO</title>
|
2007-10-07 17:16:25 +05:30
|
|
|
<para><citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>group</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>passwd</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>shadow</refentrytitle><manvolnum>5</manvolnum>
|
2007-10-07 17:16:16 +05:30
|
|
|
</citerefentry>,
|
|
|
|
<citerefentry>
|
2007-10-07 17:17:01 +05:30
|
|
|
<refentrytitle>usermod</refentrytitle><manvolnum>8</manvolnum>
|
|
|
|
</citerefentry>.
|
2007-10-07 17:16:16 +05:30
|
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
|
|
|
|
<refsect1 id='exit_values'>
|
|
|
|
<title>EXIT VALUES</title>
|
2007-10-07 17:16:25 +05:30
|
|
|
<para>
|
|
|
|
The <command>pwck</command> command exits with the following values:
|
|
|
|
<variablelist>
|
2007-10-07 17:17:01 +05:30
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>0</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>success</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>1</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>invalid command syntax</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>2</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>one or more bad password entries</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>3</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>can't open password files</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>4</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>can't lock password files</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
|
|
|
<varlistentry>
|
|
|
|
<term><replaceable>5</replaceable></term>
|
|
|
|
<listitem>
|
|
|
|
<para>can't update password files</para>
|
|
|
|
</listitem>
|
|
|
|
</varlistentry>
|
2007-10-07 17:16:25 +05:30
|
|
|
</variablelist>
|
|
|
|
</para>
|
2007-10-07 17:16:16 +05:30
|
|
|
</refsect1>
|
|
|
|
</refentry>
|