online time limit?

Asked by johnhoward68 on 2009-03-15

No issue or problem, per se. Just wondered, from the brief description of this app, if it will feature the ability for a parent to allot a certain number of minutes per day the child user allowed to go online, yet allow them to still access other applications (such as their word processor) even if their online allowance is used up. As a parent I want to limit the use of things like facebook, but encourage their creative endeavors in photo/art/writing. Everything I've found so far deals with "access" in a general sense, and draws no distinctions regarding what apps are being used by the child. Also, the ability to prevent child from installing anything on the computer would be great. (this may already exist... I'm very new to the world of ubutu linux).

Question information

Language:
English Edit question
Status:
Answered
For:
WebContentControl Edit question
Assignee:
No assignee Edit question
Last query:
2009-03-15
Last reply:
2009-03-16
KIAaze (zohn-joidberg) said : #1

Yes, this is already possible. It's just not completely integrated into the GUI yet. (like a lot of other functions).

As for preventing the child from installing anything on the computer, this is very easy and doesn't require installation of any additional software on any GNU/Linux distribution. :)
As you may have noticed, under Ubuntu, a password is required to install software.
So there are at least two easy solutions:
1)Enable automatic login and don't give the password
2)Create a new account without superuser permissions

Another solution, if you don't want to create a user account or enable automatic login, is to activate the root account and remove superuser permissions from your account.

============
TIME CONTROL
============
1)Configure 2 (or more) filtering settings through webcontentcontrol and export them each time to a different .tcs file.
Let's say you've created 2 .tcs files:
/root/work.tcs
/root/play.tcs

2)Set up cron jobs to load those different configurations at given times.
Here's an explanation of how to use crontab: http://www.adminschoice.com/docs/crontab.htm

Now, from a terminal, run "sudo crontab -e" and fill it in like this:
#==================================
SCRIPT_PATH=/usr/share/webcontentcontrol/scripts
TCS_PATH=/root/
USERNAME=johnhoward68
# m h dom mon dow command

#shut down every day between 00:00 and 08:00 ("* 0-7 * * *" means 00:00-7:59 here)
* 0-7 * * * /sbin/shutdown -h now

#workdays
#use work.tcs settings from 08:00 to 17:00
* 8-16 * * 1-5 $SCRIPT_PATH/totalcontrol_load.sh $USERNAME $TCS_PATH/work.tcs
#use play.tcs settings from 17:00 to 00:00
* 17-23 * * 1-5 $SCRIPT_PATH/totalcontrol_load.sh $USERNAME $TCS_PATH/play.tcs

#weekends
#use play.tcs settings from 08:00 to 09:00
* 8 * * 0,6 $SCRIPT_PATH/totalcontrol_load.sh $USERNAME $TCS_PATH/play.tcs
#use work.tcs settings from 09:00 to 10:00
* 9 * * 0,6 $SCRIPT_PATH/totalcontrol_load.sh $USERNAME $TCS_PATH/work.tcs
#force logout and prevent login of user USER between 10:30 and 10:45
30-45 10 * * 0,6 $SCRIPT_PATH/logout.sh USER
#===========================
Adapt as needed of course. :)

=============
PROGRAM CONTROL
=============
1)Create different program groups:
sudo addgroup GROUP1
sudo addgroup GROUP2
sudo addgroup GROUP3

2)Add the programs to control to the group:
sudo /usr/share/webcontentcontrol/scripts/set_program_to_group.sh PROGRAM GROUP
ex:
sudo /usr/share/webcontentcontrol/scripts/set_program_to_group.sh supertux gaming

3)Configure different settings with webcontentcontrol as previously (you can modify the previous ones) by using the "Program permissions" tab to define which groups the user should be added/removed too when the setting is loaded.
Currently, only one user can be defined unfortunately. You can select the "protected user" at the bottom of the GUI.

4)Set up the cronjobs (or use the same) as previously.
A .tcs file contains the so-called "totalcontrol files" which are used to add/remove a user from specific groups.
The user who will be added/removed to the defined groups is given as argument to the totalcontrol_load.sh command.
ex:
#apply work.tcs settings by applying the netfiltering to all users and the program permissions to joe
* 9 * * 0,6 $SCRIPT_PATH/totalcontrol_load.sh joe $TCS_PATH/work.tcs
#apply work.tcs settings by applying the netfiltering to all users and the program permissions to emma
* 9 * * 0,6 $SCRIPT_PATH/totalcontrol_load.sh emma $TCS_PATH/work.tcs

IMPORTANT NOTE: After adding/removing a user from/to a group, it's necessary to log out for the changes to take effect. I have an idea of how to fix that (simply kill all forbidden progs regularly), but it's not implemented yet.
The current version of totalcontrol_load.sh will unfortunately log you out even if no allowed/banned groups have been set up.
I'll make a quick release now with the latest code to fix this. But it will still force logout if allowed/banned groups have been set up of course.

===========
USEFUL SCRIPTS:
===========
They are located in /usr/share/webcontentcontrol/scripts/
usage : ./set_program_to_group.sh <program> <group>
usage : ./add_user_to_group.sh <user> <group>
usage : ./remove_user_from_group.sh <user> <group>
usage : ./logout.sh [username]

I would like to implement all this in the GUI, but don't know when I'll have time.
I'm really hoping the GChildCare project gets active soon. It should be better thought out and easier to use.
I made that GUI pretty quickly so people have at least a temporary easy to install solution. But it's far from complete.

KIAaze (zohn-joidberg) said : #2

I forgot to mention it because I don't use it, but dansguardian (configurable through the GUI) also offers time-based control:
Look at the file banned sites list for example (/etc/dansguardian/lists/bannedsitelist):

# Time limiting syntax:
# #time: <start hour> <start minute> <end hour> <end minute> <days>
# Example:
##time: 9 0 17 0 01234
# Remove the first # from the line above to enable this list only from
# 9am to 5pm, Monday to Friday.

Other than that, user specific net filtering is currently only possible by configuring Dansguardian.
cf http://contentfilter.futuragts.com/wiki/doku.php for more info.

Can you help with this problem?

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

To post a message you must log in.