Add ability to clear or set lastlog record for user via lastlog command

This functionality is useful because there is now a feature
of Linux-PAM's pam_lastlog module to block expired users (users
which did not login recently enough) from login. This commit
complements it so the sysadmin is able to unblock such expired user.

Signed-off-by: Tomáš Mráz <tmraz@fedoraproject.org>
This commit is contained in:
Tomas Mraz
2016-03-03 15:37:01 +01:00
parent af064545bf
commit 66897b6f6d
3 changed files with 135 additions and 3 deletions

View File

@ -103,6 +103,17 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-C</option>, <option>--clear</option>
</term>
<listitem>
<para>
Clear lastlog record of an user. This option can be used only together
with <option>-u</option> (<option>--user</option>)).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-h</option>, <option>--help</option>
@ -123,6 +134,17 @@
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-S</option>, <option>--set</option>
</term>
<listitem>
<para>
Set lastlog record of an user to the current time. This option can be
used only together with <option>-u</option> (<option>--user</option>)).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-t</option>, <option>--time</option>&nbsp;<replaceable>DAYS</replaceable>