View previous topic :: View next topic |
Author |
Message |
cesarguere n00b
Joined: 05 Nov 2016 Posts: 53 Location: Buenos Aires, Argentina
|
Posted: Thu Jul 06, 2017 3:53 am Post subject: How to use PAM to restrict time to any user? |
|
|
I need to limit the amount of time my child uses the pc to 3 hours a day. I was reading a bit and discovered that /etc/security/time.conf can do that. But the rules I saw can not limit the maximum usage time per day. I can only limit it from 09.00 to 13.00 (example). Is there a solution to this problem? Has gentoo any package that does this? |
|
Back to top |
|
|
Syl20 l33t
Joined: 04 Aug 2005 Posts: 619 Location: France
|
Posted: Fri Jul 07, 2017 8:55 am Post subject: |
|
|
It seems there isn't such a PAM module, but you could launch some tasks using pam_script.
For example :
- on logout, write a timestamp file containing the overall logged in time,
- on logon, read the timestamp file, and create a logout "at" task. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|