summaryrefslogtreecommitdiffstats
path: root/modules/pam_timestamp/pam_timestamp.8.xml
blob: 83e5aea88aa31d8d999bdf782d18dd00811ff6dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?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="pam_timestamp">

  <refmeta>
    <refentrytitle>pam_timestamp</refentrytitle>
    <manvolnum>8</manvolnum>
    <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
  </refmeta>

  <refnamediv id="pam_timestamp-name">
    <refname>pam_timestamp</refname>
    <refpurpose>Authenticate using cached successful authentication attempts</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis id="pam_timestamp-cmdsynopsis">
      <command>pam_timestamp.so</command>
      <arg choice="opt">
        timestampdir=<replaceable>directory</replaceable>
      </arg>
      <arg choice="opt">
        timestamp_timeout=<replaceable>number</replaceable>
      </arg>
      <arg choice="opt">
        verbose
      </arg>
      <arg choice="opt">
        debug
      </arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="pam_timestamp-description">

    <title>DESCRIPTION</title>

    <para>
      In a nutshell, <emphasis>pam_timestamp</emphasis> caches successful
authentication attempts, and allows you to use a recent successful attempt as
the basis for authentication. This is similar mechanism which is used in
<command>sudo</command>.
    </para>
    <para>
      When an application opens a session using <emphasis>pam_timestamp</emphasis>,
a timestamp file is created in the <emphasis>timestampdir</emphasis> directory
for the user.  When an application attempts to authenticate the user, a
<emphasis>pam_timestamp</emphasis> will treat a sufficiently recent timestamp
file as grounds for succeeding.
    </para>
    <para condition="openssl_hmac">
      The default encryption hash is taken from the
      <emphasis remap='B'>HMAC_CRYPTO_ALGO</emphasis> variable from
      <emphasis>/etc/login.defs</emphasis>.
    </para>
  </refsect1>

  <refsect1 id="pam_timestamp-options">

    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
         <term>
            <option>timestampdir=<replaceable>directory</replaceable></option>
         </term>
         <listitem>
            <para>
               Specify an alternate directory where
	       <emphasis>pam_timestamp</emphasis> creates timestamp files.
            </para>
         </listitem>
      </varlistentry>
      <varlistentry>
         <term>
            <option>timestamp_timeout=<replaceable>number</replaceable></option>
         </term>
         <listitem>
            <para>
               How long should <emphasis>pam_timestamp</emphasis>
	       treat timestamp as valid after their
               last modification date (in seconds). Default is 300 seconds.
            </para>
         </listitem>
      </varlistentry>
      <varlistentry>
         <term>
            <option>verbose</option>
         </term>
         <listitem>
            <para>
               Attempt to inform the user when access is granted.
            </para>
         </listitem>
      </varlistentry>
      <varlistentry>
         <term>
            <option>debug</option>
         </term>
         <listitem>
            <para>
               Turns on debugging messages sent to <citerefentry>
	       <refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum>
	       </citerefentry>.
            </para>
         </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id="pam_timestamp-types">
    <title>MODULE TYPES PROVIDED</title>
    <para>
      The <option>auth</option> and <option>session</option>
      module types are provided.
    </para>
  </refsect1>

  <refsect1 id='pam_timestamp-return_values'>
    <title>RETURN VALUES</title>
    <variablelist>
      <varlistentry>
        <term>PAM_AUTH_ERR</term>
        <listitem>
          <para>
            The module was not able to retrieve the user name or
            no valid timestamp file was found.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SUCCESS</term>
        <listitem>
          <para>
            Everything was successful.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>PAM_SESSION_ERR</term>
        <listitem>
          <para>
	    Timestamp file could not be created or updated.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id='pam_timestamp-notes'>
    <title>NOTES</title>
    <para>
      Users can get confused when they are not always asked for passwords when
running a given program. Some users reflexively begin typing information before
noticing that it is not being asked for.
    </para>
  </refsect1>

  <refsect1 id='pam_timestamp-examples'>
    <title>EXAMPLES</title>
    <programlisting>
auth sufficient pam_timestamp.so verbose
auth required   pam_unix.so

session required pam_unix.so
session optional pam_timestamp.so
    </programlisting>
  </refsect1>

  <refsect1 id="pam_timestamp-files">
    <title>FILES</title>
    <variablelist>
      <varlistentry>
        <term><filename>/var/run/pam_timestamp/...</filename></term>
        <listitem>
          <para>timestamp files and directories</para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1 id='pam_timestamp-see_also'>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
	<refentrytitle>pam_timestamp_check</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>

  <refsect1 id='pam_timestamp-author'>
    <title>AUTHOR</title>
      <para>
        pam_timestamp was written by Nalin Dahyabhai.
      </para>
  </refsect1>

</refentry>