timeoutd does not restrict login time if LOGIN/NOLOGIN lines are after session limit lines
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
timeoutd (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: timeoutd
= System: Ubuntu 7.04 Desktop x86
= timeoutd: 1.5-10
= Problem: timeoutd does not restrict login time
= Steps to reproduce:
- Install timeoutd
- Enter (for example) the following /etc/timeouts file:
=-=-=-=
Al:*:*:root:0:0:0:0
Al:*:*:
Al:*:*:root:LOGIN
Al2130-
=-=-=-=
- check date
Sun Jun 24 06:25:48 BRT 2007
(i.e, login/session should NOT be permitted for non-root users as per the above file)
- call timeoutd in one-shot check mode:
timeoutd nobody tty1; echo $?
0
(i.e, login/session permitted)
- Now edit /etc/timeouts and put the LOGIN/NOLOGIN lines up front, like that:
=-=-=-=
Al:*:*:root:LOGIN
Al2130-
Al:*:*:root:0:0:0:0
Al:*:*:
=-=-=-=
- Test again with timeoutd:
timeoutd nobody tty1; echo $?
Logins not allowed at this time. Please try again later.
20
(i.e, now the login time restriction is working)
= Comments/Proposed fix:
- 'man timeouts' says that "timeoutd will use the first entry for which the TIMES:TTYS:
best fix would be to make that clear in the documentation:
=-=-=-=
--- timeouts.
+++ timeouts.5 2007-06-24 06:42:14.000000000 -0300
@@ -12,11 +12,11 @@
the first non blank character is a hash (#) will be ignored. All other
lines should be of the format:
.PP
-TIMES:
+TIMES:
.PP
OR
.PP
-TIMES:
+TIMES:
.PP
\fBTIMES\fR is a comma separated list of times for which the entry is valid.
The entry will be ignored completely outside these times.
@@ -62,7 +62,9 @@
.PP
When searching through the timeouts file, timeoutd will use the first
entry for which the TIMES:TTYS:
-user who is being checked.
+user who is being checked. So, please note that any LOGINSTATUS lines
+will need to be put before any 'session limit' lines or they will not
+be obeyed.
.PP
When calculating the number of minutes for which a user has been logged
on in the given day, timeoutd will consider logged in time on all
=-=-=-=
= Eof
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.