[Novalug] Limiting User Time on a Linux Computer

Angelo Bertolli angelo at freeshell.org
Sun Apr 8 17:32:29 EDT 2007


Kurt Harper wrote:
> Subba,
>  
> Yes, I'm root and no, the kids don't have root privileges, so there's 
> still hope.
>  
> I'm surprised this isn't easier to do.  I wonder if limits.conf could 
> add a qualifier like "Per Session" or "Per Day," then run a timer and 
> disable a user until the next day once the limit was hit?  Should I 
> suggest it to the maintainers? I know a bunch of parents who would 
> like that (I work with schools), perhaps enough to convert to Linux if 
> for no other reason. ;-)

Even so, I don't think CPU time means "time you're logged in" which is 
what you want.  So, they will get X amount of time of the CPU operating 
at 100%.

I think maybe you should put your kids on the honor system, and just 
check to see how long they were on afterwards.  It's easy to tell with 
the 'last' command.  As you can see, on the 7th, I was logged in for 1 
hour and 24 minutes total.

angelo at descartes:~$ last
angelo   pts/0        192.168.0.100    Sun Apr  8 17:31   still logged in
angelo   pts/0        192.168.0.100    Sun Apr  8 13:39 - 13:40  (00:00)
angelo   pts/0        192.168.0.100    Sat Apr  7 23:08 - 23:22  (00:13)
angelo   pts/0        192.168.0.100    Sat Apr  7 23:05 - 23:08  (00:02)
angelo   pts/0        192.168.0.100    Sat Apr  7 12:10 - 13:15  (01:05)
angelo   pts/0        192.168.0.100    Sat Apr  7 12:01 - 12:02  (00:00)
angelo   pts/0        192.168.0.100    Sat Apr  7 00:44 - 00:48  (00:04)
angelo   pts/1        192.168.0.100    Fri Apr  6 22:55 - 02:21  (03:25)


-- 
Angelo Bertolli
Please remove my email address from your post when replying
[Tech http://bitfreedom.com | Gaming http://heroesonly.com]



More information about the Novalug mailing list