1TIME.CONF(5)                   Linux-PAM Manual                   TIME.CONF(5)
2
3
4

NAME

6       time.conf - configuration file for the pam_time module
7

DESCRIPTION

9       The pam_time PAM module does not authenticate the user, but instead it
10       restricts access to a system and or specific applications at various
11       times of the day and on specific days or over various terminal lines.
12       This module can be configured to deny access to (individual) users
13       based on their name, the time of day, the day of week, the service they
14       are applying for and their terminal from which they are making their
15       request.
16
17       For this module to function correctly there must be a correctly
18       formatted /etc/security/time.conf file present. White spaces are
19       ignored and lines maybe extended with '\' (escaped newlines). Text
20       following a '#' is ignored to the end of the line.
21
22       The syntax of the lines is as follows:
23
24       services;ttys;users;times
25
26       In words, each rule occupies a line, terminated with a newline or the
27       beginning of a comment; a '#'. It contains four fields separated with
28       semicolons, ';'.
29
30       The first field, the services field, is a logic list of PAM service
31       names that the rule applies to.
32
33       The second field, the tty field, is a logic list of terminal names that
34       this rule applies to.
35
36       The third field, the users field, is a logic list of users or a
37       netgroup of users to whom this rule applies.
38
39       A logic list namely means individual tokens that are optionally
40       prefixed with '!' (logical not) and separated with '&' (logical and)
41       and '|' (logical or).
42
43       For these items the simple wildcard '*' may be used only once. With
44       netgroups no wildcards or logic operators are allowed.
45
46       The times field is used to indicate the times at which this rule
47       applies. The format here is a logic list of day/time-range entries. The
48       days are specified by a sequence of two character entries, MoTuSa for
49       example is Monday Tuesday and Saturday. Note that repeated days are
50       unset MoMo = no day, and MoWk = all weekdays bar Monday. The two
51       character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the
52       last two being week-end days and all 7 days of the week respectively.
53       As a final example, AlFr means all days except Friday.
54
55       Each day/time-range can be prefixed with a '!' to indicate "anything
56       but". The time-range part is two 24-hour times HHMM, separated by a
57       hyphen, indicating the start and finish time (if the finish time is
58       smaller than the start time it is deemed to apply on the following
59       day).
60
61       For a rule to be active, ALL of service+ttys+users must be satisfied by
62       the applying process.
63
64       Note, currently there is no daemon enforcing the end of a session. This
65       needs to be remedied.
66
67       Poorly formatted rules are logged as errors using syslog(3).
68

EXAMPLES

70       These are some example lines which might be specified in
71       /etc/security/time.conf.
72
73       All users except for root are denied access to console-login at all
74       times:
75
76           login ; tty* & !ttyp* ; !root ; !Al0000-2400
77
78
79       Games (configured to use PAM) are only to be accessed out of working
80       hours. This rule does not apply to the user waster:
81
82           games ; * ; !waster ; Wd0000-2400 | Wk1800-0800
83
84
85

SEE ALSO

87       pam_time(8), pam.d(5), pam(8)
88

AUTHOR

90       pam_time was written by Andrew G. Morgan <morgan@kernel.org>.
91
92
93
94Linux-PAM Manual                  09/03/2021                      TIME.CONF(5)
Impressum