Killer Method
This first method assumes you're running Ubuntu but will work on most variants. You'll also need to have your kids set up with their own accounts, which you can do during your install or any time afterwards. We'll cover installing and users in another post, if you don't have that already.
There's probably a kinder way to do this (in Linux there's always many ways to do something) but we're going to schedule a little task that will unceremoniously end all kid programs after hours. If they log back in, it will kill them again and they'll be back at the login prompt.
Step 1. Press Alt-F2 which should pop up a Run Application box, where you should type the following, then press Run:
gksu gedit /etc/cron.d/bedtime
Step 2: A gedit text editor will appear. Copy the following text and paste it into the editor, then customize to suit. The first word, *, means we'll run every minute. The second word, "21-23,0-7" means every hour from 8pm to 7am. The next three are day of month, month, and day of week, but in this case the * again means "all" for them. Joey is your victim's user name.
Router Method
Another method bears mentioning. Many routers, in my example here the venerable Linksys WRT54G, have an access control screen that will let you allow or deny a list of PCs, identified by their MAC address, on a given schedule, to access the internet. This one also lets you further limit them to certain sites or block them from certain others. Your router will surely vary.
One advantage of this method is it works on all machines, not just Linux ones, without touching them. Place your victim's MAC address in an access list (because you want to use the Internet after the kids' bedtime, right?). Chose a schedule, and off they go. If you're going to use the blocking feature, note that doing a few sites with the router is great but will quickly reach its limits. In another post we'll set up OpenDNS, where you can chose whole categories of sites to allow or not.
Step 2: A gedit text editor will appear. Copy the following text and paste it into the editor, then customize to suit. The first word, *, means we'll run every minute. The second word, "21-23,0-7" means every hour from 8pm to 7am. The next three are day of month, month, and day of week, but in this case the * again means "all" for them. Joey is your victim's user name.
* 21-23,0-7 * * * root /usr/bin/pkill -u joey > /dev/null 2>&1
Step 3: Choose menu File->Save and then File->Quit. That's it!
Router Method
Another method bears mentioning. Many routers, in my example here the venerable Linksys WRT54G, have an access control screen that will let you allow or deny a list of PCs, identified by their MAC address, on a given schedule, to access the internet. This one also lets you further limit them to certain sites or block them from certain others. Your router will surely vary.
One advantage of this method is it works on all machines, not just Linux ones, without touching them. Place your victim's MAC address in an access list (because you want to use the Internet after the kids' bedtime, right?). Chose a schedule, and off they go. If you're going to use the blocking feature, note that doing a few sites with the router is great but will quickly reach its limits. In another post we'll set up OpenDNS, where you can chose whole categories of sites to allow or not.

No comments:
Post a Comment