TIME.CONF(5)

โœจ TIME.CONF(5) โœจ

ok so bestie, we're in the time.conf zone โ€” that's the config file for the pam_time module, and yes this is the Linux-PAM Manual era ๐Ÿ’… buckle up, it's giving access control but make it cute ๐ŸŽ€


๐ŸŒธ NAME ๐ŸŒธ

time.conf โ€” the configuration file for the pam_time module, no cap ๐Ÿ’–


๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so here's the tea: the pam_time PAM module is NOT out here authenticating anybody. it does not do that. instead it restricts access to a system and/or specific applications at various times of the day, and on specific days, or over various terminal lines. main character energy but for gatekeeping โœ‹

this module can be configured to deny access to (individual) users based on:

  • their name
  • the time of day
  • the day of week
  • the service they are applying for
  • the terminal from which they are making their request

for this module to function correctly there must be a correctly formatted /etc/security/time.conf file present. periodt. ๐Ÿ’ฏ

white spaces are ignored, and lines maybe extended with '\' (escaped newlines). text following a '#' is ignored to the end of the line. so go ahead and leave notes for yourself, she won't read them ๐Ÿซถ

the syntax of the lines is as follows:

services;ttys;users;times

in words: each rule occupies a line, terminated with a newline or the beginning of a comment; a '#'. it contains four fields separated with semicolons, ';'. four fields, four vibes, we love structure โœจ

  • the first field, the services field, is a logic list of PAM service names that the rule applies to.
  • the second field, the tty field, is a logic list of terminal names that this rule applies to.
  • the third field, the users field, is a logic list of users or a netgroup of users to whom this rule applies.

a logic list namely means individual tokens that are optionally prefixed with '!' (logical not) and separated with '&' (logical and) and '|' (logical or). so it's basically a little boolean bestie, iconic honestly ๐Ÿ’…

for these items the simple wildcard '*' may be used only once. and with netgroups, no wildcards or logic operators are allowed. sorry, those are the rules, she said what she said ๐Ÿ™ˆ

the times field is used to indicate the times at which this rule applies. the format here is a logic list of day/time-range entries. the days are specified by a sequence of two character entries โ€” MoTuSa for example is Monday Tuesday and Saturday. ๐Ÿ—“๏ธ

note that repeated days are unset โ€” MoMo = no day, and MoWk = all weekdays bar Monday. sneaky, lowkey. the two character combinations accepted are:

Mo Tu We Th Fr Sa Su Wk Wd Al

the last two being week-end days and all 7 days of the week respectively. as a final example, AlFr means all days except Friday. as in, not like other days ๐Ÿ’€

each day/time-range can be prefixed with a '!' to indicate "anything but". the time-range part is two 24-hour times HHMM, separated by a hyphen, indicating the start and finish time (if the finish time is smaller than the start time it is deemed to apply on the following day). yes the times wrap around, she contains multitudes ๐ŸŒ™

for a rule to be active, ALL of service+ttys+users must be satisfied by the applying process. all of them. every single one. no partial credit ๐Ÿšจ

also, heads up: currently there is no daemon enforcing the end of a session. this needs to be remedied. yes we know, it's a whole thing, someone get on that ๐Ÿ˜ญ

poorly formatted rules are logged as errors using syslog(3). so if you mess up, at least she'll tell you where ๐ŸŒˆ


๐ŸŽ€ EXAMPLES ๐ŸŽ€

these are some example lines which might be specified in /etc/security/time.conf. copy responsibly bestie โœจ

all users except for root are denied access to console-login at all times:

login ; tty* & !ttyp* ; !root ; !Al0000-2400

games (configured to use PAM) are only to be accessed out of working hours. this rule does not apply to the user waster:

games ; * ; !waster ; Wd0000-2400 | Wk1800-0800

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

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

go read those too, they're part of the lore ๐Ÿ“š


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

pam_time was written by Andrew G. Morgan <morgan@kernel.org>. we stan a legend ๐Ÿซถ


and that's the whole page, bestie! this one's from Linux-PAM, dated 09/27/2026, and it lives at TIME.CONF(5). go forth and schedule your access control with taste ๐Ÿ’–โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from