Restrict how long users can log in for

Asked by Brendon Hatcher

The problem

1. The computer lab is a limiting resource, as there are far more users than time and PCs available
2. Users are therefore restricted to 1 hour a day
3. Because of gender issues and inter-generational issues at play in the community, it is difficult for the young, female lab administrators to enforce the restriction
4. Even if enforcement wasn’t a challenge, it is also difficult to manually track who has used up their time allocation in a busy lab

The solution

1. A user administration area where user time allocations are set, and remaining hours viewed
2. A tool which tracks user time based on when they logged in
3. A remote control app that notifies users and then locks them out when their time is up

The technical parameters

Time allocations

Complex mapping of users to time allocations and rolling windows, with groups and rules
Group Hours per week Max per day
1 5 1
2 5 2
3 10 2
4 10 5

Usage logging

• Time starts on login and is tracked against the usage for the current date
• The time used must accumulate against a user’s allocation, even if they use different client PCs each time, and even if they log on and off multiple times in a day.

Notification and logout

1. User is warned 10 minutes before deadline
2. User is warned 2 minutes before deadline
3. Logout happens at deadline

Note: It would be very useful if users could see all previous usage, usage remaining for the day, and usage remaining for the week, so that they can prioritise their work in terms of the remaining time available.

Platforms

The software has to work on a somewhat rare configuration:

• The device to be locked is a Raspberry Pi running as a fat client using PiNet and booting Raspbian OS
• User login occurs on the Pi, but is logged on the PiNet server
• The PiNet server has Epoptes for client management
• Epoptes has routines for broadcast to user, and logging off/restarting specific devices
• There are other logging tools that know how many hours the user was logged in for – e.g. psacct or acct

Challenges

• Cannot log only a single continuous user session of 1 hour – what happens if the computer logs off, reboots etc.
• A accidental or forced reboot should suspend the user time tracking until they login again
• The final logout should happen no matter if files are open, but should ideally not commonly result in loss of data
• “an hour a day” doesn’t necessarily match resource allocations and load balancing. 5 hours in a week, no more than 2 hours a day might be better.
• Lab managers have to make sure that users don’t register multiple times
• Administrative override is probably necessary, but then puts pressure on lab administrators to bend the rules
• Epoptes appears not to have a plugin or API architecture
• If we build for epoptes, then the benefit is spread to all epoptes users on all platforms, not just fat client RPi
• Does epoptes know anything about users, or only about clients? Client PCs are identified by client name, not user name
• Where should the locus of control be?
o It can't be on the RP itself, because then the user could just go to another RP.
o It could be PiNet istelf, since PiNet knows about the users.
o It could be Epoptes, since that also knows about the users, and has logout and broadcast capabilities. However, there is no API or plugin system for Epoptes, so development could be hard.
o Finally, could it be the Ubuntu server itself, if the server knows when a user is logging into the RP?

Questions

Please contact me if you have any questions regarding the scope.

Assistance sought

We are seeking developers to assist with the coding as follows:

• International developers on a voluntary basis – we will highlight your contribution online, in our media, and in the system documentation
• South African developers on a voluntary basis – all of the above, plus points on your BEE scorecard, and/or a tax deduction certificate (the software recipient is a accredited non-profit organisation)

Please respond if you are able to help

Question information

Language:
English Edit question
Status:
Answered
For:
Epoptes Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alkis Georgopoulos (alkisg) said :
#1

Hi, it's not difficult to implement this in Epoptes, but the work needs to be sponsored, we don't have enough free time to do it on a voluntary basis.

Revision history for this message
Brendon Hatcher (suppout) said :
#2

Hi Alkis

I am glad to hear that it is possible.
I am happy to sponsor the work, and would prefer that it be done by someone at the heart of the project, rather than a random developer - easier for a core dev to understand what needs doing, and it means the payment supports the core people.

Please can you contact me at <email address hidden> to discuss costs and timeframes.

Thanks
Brendon

Revision history for this message
Alkis Georgopoulos (alkisg) said :
#3

Mail sent, closing the question. Thanks! :)

Can you help with this problem?

Provide an answer of your own, or ask Brendon Hatcher for more information if necessary.

To post a message you must log in.