HACKER Q&A
📣 freedomben

Parental Controls for Linux?


We're a Linux household, and as my kids have gotten older I've wanted them to learn to use a general-purpose computer. However, there are tools that parental controls can give that greatly assist. It can be as simple as a time-limit, or web filtering, or allowing certain apps, etc. I've looked for things and haven't had much success, but I can't imagine I'm the only person with this problem. Gnome has recently been starting a project[1] that looks really good, but it's still very early days.

Are there any existing options out there? What are other caretakers using? If you were desparate and considering starting to build your own tools, what tech stack would you look at, or where would you target the implementation?

[1]: https://wiki.gnome.org/Design/OS/ParentalControls


  👤 LinuxBender Accepted Answer ✓
So not strictly parental controls so to speak, but most Linux distributions will install PAM Pluggable Authentication Modules and those modules can be used to control access to many things system login, network, etc... based on username, group, time of day, day of week and combinations of those things. It's not the easiest thing to configure and I don't know if there is a GUI for it but it may technically meet your needs. Without knowing what distribution you are using I usually start with the documentation on Arch's site [0][1]. They have really good documentation. This man page [2] shows some of the modules that can be used in PAM to add restrictions to various sub-systems.

A simpler and probably heavy handed approach would be to have cron jobs that disable the network or shut down the computer during specific hours/days assuming the kids don't have sudo/doas/root permissions.

There are also sites that have Block-Lists for adult content, spam, malware, etc... that can be added to local DNS, /etc/hosts or however you wish to manage them. There are also DNS providers that can do this for you should you wish to delegate the blocking to someone else. OpenDNS has this ability for example. [3] I have not tested it but there is a Firefox addon for adult content [4] called FoxFilter.

[0] - https://wiki.archlinux.org/title/Parental_control

[1] - https://wiki.archlinux.org/title/PAM

[2] - https://www.man7.org/linux/man-pages/man8/pam.8.html

[3] - https://www.opendns.com/setupguide/#familyshield

[4] - https://addons.mozilla.org/en-US/firefox/addon/foxfilter/