Has stopped restricing time on ubunu 20.04

Bug #1926133 reported by Paul Mackinlay
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Timekpr-nExT
Invalid
Undecided
Eduards Bezverhijs

Bug Description

It has stopped restricting time, I can login with an account that has a limit of 30 minutes and use it all day without being logged out.

On Timekpr (SU) in the Info & Today tab for the restricted account:
Time left (actual) - does not change, it stays on 30 mins
Time inactive (actual) - increases thoughout the day
Time left (today) - does not change, it stays on 30 mins

To me it looks like the way it detects active/inactive access is not working. In the Additional options tab, I checked Track inactive sessions thinking that this would restrict the account regardless if it is active/inactive but that has had no effect.

Also it looks like /var/log/timekpr.log is not archiving properly, mine was taking almost 3GB of space

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

To help, I need config files from the following directories:
/var/lib/timekpr/work/timekpr.*.conf
/var/lib/timekpr/config/timekpr.*.conf

And I would need log file as well, you could get that by this command:
tail -n 100000 /var/log/timekpr.log > timekpr.last.100K.log

3GB is very large, but logrotate should have taken care of it. Do you have it installed?
Maybe timekpr is logging a lot of errors, for that I need a 100K of lines from log file.

Also, could you please run:
ls -latr /var/log/timekpr.log*

Changed in timekpr-next:
status: New → Incomplete
assignee: nobody → Eduards Bezverhijs (mjasnik)
Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Also, was it working before or this started right after installation?

Revision history for this message
Paul Mackinlay (paul-webotech) wrote :

I have attached the config & work files.

It used to work fine, I am pretty sure there was an update a few weeks ago. That may have caused the problem. My kids chose not to tell me that their time was no longer being restricted so it's hard for me to say when it started happening.

By the way I am seeing the same issue on multiple hosts, all have ubuntu 20.04.

Also the hour interval functionality is working fine. So if I configure an account to have an hour interval between 10:00 and 20:00, outside of these hours the account is locked out.

Revision history for this message
Paul Mackinlay (paul-webotech) wrote :

I blew away the timekpr logs earlier today when I saw how much space they were taking up. I went through the first and last couple of pages to see if I could see any obvious errors or if the logging was very different between the top of the log file and the bottom but it all looked OK.

ls -latr /var/log/timekpr.log*
-rw-r--r-- 1 root root 24673574 Apr 26 21:04 /var/log/timekpr.log

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

If the problem is for user "emmaalex", then it's a configuration issue.

You have enabled unlimited time (hour interval should have symbol ∞ next to it) which basically means that time is not being accounted for whole interval from 6:00 in the morning until 20:30 in the evening. Party time :)

The rest of the accounts do not have this, for them time should be accounted as usual.

Please uncheck unlimited time and time accounting will be back as usual.

More information can be found in the link in project description.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

About log file, it seems that logrotate is not working, that's why the file is so big.
Please check whether you have it installed and it actually works:
apt-cache policy logrotate
systemctl status logrotate

By default it comes installed and should just work.

Revision history for this message
Paul Mackinlay (paul-webotech) wrote :

I fixed the config and it is working. Sorry I never read the tooltip on the ∞ checkbox, I just assumed it meant 'enable this time slot'.

Revision history for this message
Eduards Bezverhijs (mjasnik) wrote :

Were you able to fix logrotate?
Btw, you can reduce logging to lowest level possible, that would generate very few lines of logs, standard level is there in case of issues.

Changed in timekpr-next:
status: Incomplete → Won't Fix
status: Won't Fix → Invalid
Revision history for this message
Paul Mackinlay (paul-webotech) wrote :

er... yeah logrotate was my fault. I turned it off while I was implementing a systemd service and completely forgot to turn it back on again.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.