[lug] access and time length control
Zan Lynx
zlynx at acm.org
Sun Oct 10 19:39:49 MDT 2004
On Sun, 2004-10-10 at 16:40 -0600, Phil Rasch wrote:
> I have a couple of teenage kids. I would like to limit access to a linux box
> using a rule like the following.
>
> "Let Bobby login between 8PM and 10PM for at most one hour on
> weekdays, and between 8AM and midnight for at most two hours per day
> on weekends and holidays"
>
> I know I can do parts of this task using squid, but I can think of a couple
> of problems with that approach.
> 1) it doesnt prevent the kids doing games on the box. Just getting on the net.
> 2) if one makes a connection (for example with GAIM) prior to the "end time"
> they can keep it going forever unless I figure out some smart way to
> force a restart of the connection.
>
> I really dont want to spend a week figuring out a fancy way to do this. Does
> anybody have any simple suggestions?
The pam_time module to control login. See some pam doc pages, usually
in /usr/share/doc/pam-*/ and /etc/security/time.conf.
Then also set a cron job that fires at 10PM that runs as Bobby's user ID
and executes kill -TERM -1. That will kill all processes running with
Bobby's id. If you want to be nice, run it at 10:05PM and run some sort
of warning process at 10:00.
--
Zan Lynx <zlynx at acm.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20041010/1aa822ed/attachment.pgp>
More information about the LUG
mailing list