Does anyone know of a good way to set up some sort of parental controls so that one user account is subject to them, but not another?
A couple of friends of mine use Ubuntu and have kids (7 to 10 years old) who use the family computer. They'd like to have some blocking of adult sites. They're not going to supervise all the time, which I know might be ideal, but there we go. And they're not particularly technical, so they don't want to have to run scripts to turn the parental controls on and off regularly, but they can cope with having different accounts for different people. I haven't found a great way of doing this. I am pretty technical, so I'm happy to spend some time at the command line to set it up, but then it needs to just work.
Please don't just link to DansGuardian. If your answer doesn't address the different user account aspect, I will vote it down. If you want to talk about general parental controls that apply to all users then please start a new question - I'm sure that plenty of people would be interested in it, and I'll link to it from this question.
Gnome Nanny
looks like it would meet the needs of your friends perfectly. To quote the website:As you can see, Nanny can set different restrictions for each account. nanny 2.29.4-0ubuntu4 is available in the maverick and natty universe repositories. It is also part of Edubuntu. Screenshots of Nanny running on Edubuntu are available on the Edubuntu website.
DansGuardian ;-), but with a twist -- the trick is to set up transparent proxying (filtered by DansGuardian) and use
iptables
to redirect children's accounts only to the proxy. Parents would have normal direct connection to the network.Here's a sketch of how to do it:
Set up DansGuardian and Squid for transparent proxying. Ignore all the iptables/redir setup, because we're doing it in later steps.
Set up a netfilter chain for transparent proxying:
(Assuming you have configured DansGuardian to listen on port 8080.)
Now you should set up an
iptables
chain so that only packets originating from selected local accounts are sent to the transparent proxy; all the others flow undisturbed. Netfilter has aowner
match for this:There are several firefox addons that offer content filtering. I believe this is a good solution for what you want because browser extensions are installed on a per-user basis.
You can find such addons on the firefox addons site. An example of a content filtering extension is ProCon Latte.
Besides web safety, children should have a seperate non-administrator login, to prevent them doing system changing activities such as installing new software (such as a different browser to bypass the parental controls).