0

I need some smart ideas for clever ways around mac security and online child safety issues. I'm not exactly sure how to word this question. Of course my 11 year old does not have full admin rights on his laptop, but this creates problems in downloading and running packages using homebrew, etc.

We're running into lots of rights access and sudo issues. I'm downloading packages on the admin account, then trying to get things working on his user account. We're trying to get rtl-433 up and running, and running into a ton of issues with different needed packages.

How can I give him semi admin rights to be able to download and install via the terminal so he do whatever dev he needs to, yet also maintain admin rights over other aspects, internet usage etc? Anyone know some tricks?

Specifically running into access rights issues with files in user/bin/local from his account.

Does this make sense?

If I give his account admin rights just to install stuff, and change it back once things are installed, I think we're still going to run into access issues, right? or not? Is this a potential way around it?

Otherwise, is there anything like some kind of virtual environment I can run, that gives some level of access to admin rights?

4
  • 2
    Upgrading him to Admin and back should work. You also could tweak /etc/sudoers to give him access to brew and other specific commands.
    – nohillside
    Jan 12, 2021 at 13:15
  • @nohillside I like the idea of access to brew etc, how would you suggest tweaking /etc/sudoers to give him access to specific commands? Jan 12, 2021 at 16:25
  • Which version of macOS are you running?
    – nohillside
    Jan 12, 2021 at 16:46
  • 1
    Use macports it uses the normal Unix setup - Homebrew is designed to be easy for a single user and so fiddles with permissions in /usr/local so that the individual owns it. OK the admin has to do the install but a downloaded program WILL work for all users and all permissions in /usr/local etc will be consistent - even the giveing the child sudoers access to port might work
    – mmmmmm
    Feb 11, 2021 at 17:59

1 Answer 1

1

You can give admin access to specific commands using sudo. To do so, log in as an admin user, open Terminal and run EDITOR=nano sudo visudo /etc/sudoers.d/myconfig (which will create a new file and open in nano). Then add the following line (replace KID with the name of the unix account of your kid, ADMIN with the account name of the user which installed brew)

KID ALL = (ADMIN) /usr/local/bin/brew

He should then be able to run brew commands by typing sudo brew ... and entering his password.

To allow commands to be run as root (things you already run with sudo even from an admin account) use

KID ALL = /path/to/command

(obviuosly this has some risks).

1
  • Ah you're brilliant, I thought there would be a way to do this, wasn't sure how. Thank you. I'll try it and let you know how it goes. Feb 13, 2021 at 16:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .