Initial commit for Tizen
[profile/extras/shadow-utils.git] / man / faillog.8.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3    Copyright (c) 1989 - 1994, Julianne Frances Haugh
4    Copyright (c) 2007 - 2009, Nicolas François
5    All rights reserved.
6   
7    Redistribution and use in source and binary forms, with or without
8    modification, are permitted provided that the following conditions
9    are met:
10    1. Redistributions of source code must retain the above copyright
11       notice, this list of conditions and the following disclaimer.
12    2. Redistributions in binary form must reproduce the above copyright
13       notice, this list of conditions and the following disclaimer in the
14       documentation and/or other materials provided with the distribution.
15    3. The name of the copyright holders or contributors may not be used to
16       endorse or promote products derived from this software without
17       specific prior written permission.
18   
19    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20    ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
22    PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT
23    HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
24    SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
25    LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27    THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 -->
31 <refentry id='faillog.8'>
32   <!--  $Id: faillog.8.xml 2968 2009-05-21 14:04:53Z nekral-guest $ -->
33   <refmeta>
34     <refentrytitle>faillog</refentrytitle>
35     <manvolnum>8</manvolnum>
36     <refmiscinfo class="sectdesc">System Management Commands</refmiscinfo>
37   </refmeta>
38   <refnamediv id='name'>
39     <refname>faillog</refname>
40     <refpurpose>display faillog records or set login failure limits</refpurpose>
41   </refnamediv>
42
43   <refsynopsisdiv id='synopsis'>
44     <cmdsynopsis>
45       <command>faillog</command>
46       <arg choice='opt'>
47         <replaceable>options</replaceable>
48       </arg>
49     </cmdsynopsis>
50   </refsynopsisdiv>
51
52   <refsect1 id='description'>
53     <title>DESCRIPTION</title>
54     <para>
55       <command>faillog</command> displays the contents of the failure log
56       database (<filename>/var/log/faillog</filename>). It can also
57       set the failure counters and limits. When
58       <command>faillog</command> is run without arguments, it only displays the
59       faillog records of the users who had a login failure.
60     </para>
61   </refsect1>
62
63   <refsect1 id='options'>
64     <title>OPTIONS</title>
65     <para>
66       The options which apply to the <command>faillog</command> command
67       are:
68     </para>
69     <variablelist remap='IP'>
70       <varlistentry>
71         <term><option>-a</option>, <option>--all</option></term>
72         <listitem>
73           <para>
74             Display (or act on) faillog records for all users having an
75             entry in the <filename>faillog</filename> database.
76           </para>
77         </listitem>
78       </varlistentry>
79       <varlistentry>
80         <term><option>-h</option>, <option>--help</option></term>
81         <listitem>
82           <para>Display help message and exit.</para>
83         </listitem>
84       </varlistentry>
85       <varlistentry>
86         <term>
87           <option>-l</option>, <option>--lock-time</option>
88           <replaceable>SEC</replaceable>
89         </term>
90         <listitem>
91           <para>
92             Lock account for <replaceable>SEC</replaceable>
93             seconds after failed login.
94           </para>
95           <para>
96             Write access to <filename>/var/log/faillog</filename>
97             is required for this option.
98           </para>
99         </listitem>
100       </varlistentry>
101       <varlistentry>
102         <term>
103           <option>-m</option>, <option>--maximum</option>
104           <replaceable>MAX</replaceable>
105         </term>
106         <listitem>
107           <para>
108             Set the maximum number of login failures after the account is
109             disabled to <replaceable>MAX</replaceable>.
110           </para>
111           <para>
112             Selecting a
113             <replaceable>MAX</replaceable> value of 0 has the effect of not
114             placing a limit on the number of failed logins.
115           </para>
116           <para>
117             The maximum
118             failure count should always be 0 for <emphasis>root</emphasis>
119             to prevent a denial of services attack against the system.
120           </para>
121           <para>
122             Write access to <filename>/var/log/faillog</filename>
123             is required for this option.
124           </para>
125         </listitem>
126       </varlistentry>
127       <varlistentry>
128         <term><option>-r</option>, <option>--reset</option></term>
129         <listitem>
130           <para>
131             Reset the counters of login failures.
132           </para>
133           <para>
134             Write access to <filename>/var/log/faillog</filename>
135             is required for this option.
136           </para>
137         </listitem>
138       </varlistentry>
139       <varlistentry>
140         <term><option>-t</option>, <option>--time</option>
141         <replaceable>DAYS</replaceable>
142         </term>
143         <listitem>
144           <para>
145             Display faillog records more recent than
146             <replaceable>DAYS</replaceable>.
147           </para>
148         </listitem>
149       </varlistentry>
150       <varlistentry>
151         <term>
152           <option>-u</option>, <option>--user</option>
153           <replaceable>LOGIN</replaceable>|<replaceable>RANGE</replaceable>
154         </term>
155         <listitem>
156           <para>
157             Display faillog record or maintains failure counters and limits
158             (if used with <option>-l</option>, <option>-m</option> or
159             <option>-r</option> options) only for the specified user(s).
160           </para>
161           <para>
162             The users can be specified by a login name, a numerical user
163             ID, or a <replaceable>RANGE</replaceable> of users.  This
164             <replaceable>RANGE</replaceable> of users can be specified
165             with a min and max values
166             (<replaceable>UID_MIN-UID_MAX</replaceable>), a max value
167             (<replaceable>-UID_MAX</replaceable>), or a min value
168             (<replaceable>UID_MIN-</replaceable>).
169           </para>
170         </listitem>
171       </varlistentry>
172     </variablelist>
173
174     <para>
175       When none of the <option>-l</option>, <option>-m</option>, or
176       <option>-r</option> options are used, <command>faillog</command>
177       displays the faillog record of the specified user(s).
178     </para>
179     <para>
180       NOTE: in display mode, only the records of users which currently
181       exist in the system are displayed.  In the other modes (when the
182       <option>-l</option>, <option>-m</option>, or <option>-r</option>
183       options are used), the records of the user, or the range of users,
184       or all the users that may have an entry in the faillog database will
185       be changed.  This is useful to reset records of users that have been
186       deleted or set a policy in advance for a range of users.
187     </para>
188   </refsect1>
189
190   <refsect1 id='caveats'>
191     <title>CAVEATS</title>
192     <para>
193       <command>faillog</command> only prints out users with no successful
194       login since the last failure. To print out a user who has had a
195       successful login since their last failure, you must explicitly request
196       the user with the <option>-u</option> flag, or print out all users
197       with the <option>-a</option> flag.
198     </para>
199   </refsect1>
200
201   <refsect1 id='files'>
202     <title>FILES</title>
203     <variablelist>
204       <varlistentry>
205         <term><filename>/var/log/faillog</filename></term>
206         <listitem>
207           <para>Failure logging file.</para>
208         </listitem>
209       </varlistentry>
210     </variablelist>
211   </refsect1>
212
213   <refsect1 id='see_also'>
214     <title>SEE ALSO</title>
215     <para>
216       <citerefentry>
217         <refentrytitle>login</refentrytitle><manvolnum>1</manvolnum>
218       </citerefentry>,
219       <citerefentry>
220         <refentrytitle>faillog</refentrytitle><manvolnum>5</manvolnum>
221       </citerefentry>.
222     </para>
223   </refsect1>
224 </refentry>