1TIME.CONF(5) Linux-PAM Manual TIME.CONF(5)
2
3
4
6 time.conf - configuration file for the pam_time module
7
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 For these items the simple wildcard ´*´ may be used only once. With
40 netgroups no wildcards or logic operators are allowed.
41
42 The times field is used to indicate the times at which this rule
43 applies. The format here is a logic list of day/time-range entries. The
44 days are specified by a sequence of two character entries, MoTuSa for
45 example is Monday Tuesday and Saturday. Note that repeated days are
46 unset MoMo = no day, and MoWk = all weekdays bar Monday. The two
47 character combinations accepted are Mo Tu We Th Fr Sa Su Wk Wd Al, the
48 last two being week-end days and all 7 days of the week respectively.
49 As a final example, AlFr means all days except Friday.
50
51 Each day/time-range can be prefixed with a ´!´ to indicate "anything
52 but". The time-range part is two 24-hour times HHMM, separated by a
53 hyphen, indicating the start and finish time (if the finish time is
54 smaller than the start time it is deemed to apply on the following
55 day).
56
57 For a rule to be active, ALL of service+ttys+users must be satisfied by
58 the applying process.
59
60 Note, currently there is no daemon enforcing the end of a session. This
61 needs to be remedied.
62
63 Poorly formatted rules are logged as errors using syslog(3).
64
66 These are some example lines which might be specified in
67 /etc/security/time.conf.
68
69 All users except for root are denied access to console-login at all
70 times:
71
72 login ; tty* & !ttyp* ; !root ; !Al0000-2400
73
74
75 Games (configured to use PAM) are only to be accessed out of working
76 hours. This rule does not apply to the user waster:
77
78
79 games ; * ; !waster ; Wd0000-2400 | Wk1800-0800
80
81
82
84 pam_time(8), pam.d(5), pam(8)
85
87 pam_time was written by Andrew G. Morgan <morgan@kernel.org>.
88
89
90
91Linux-PAM Manual 03/02/2009 TIME.CONF(5)