Hacker News new | ask | show | jobs
by iamNumber4 2827 days ago
Somethings are supposed to be painful. If you put to many commands that should have root privileges with no password, you do two things. 1 you load the gun to shoot your self in the foot because you took the safety off. 2 if you forget to lock your session and walk away, anyone can do root things you added to sudo config.

I would suggest if you absolutely need non root users to do things manage it with groups. That is one of the reasons groups exist. Don’t use the sudo group as a dumping ground for random commands as if you need to revoke a users permission you have to edit sudo config to lock certain commands down to specific users. What you need is a group. So then if a user needs permission add them to the group, when you need to revoke permissions remove them from the group.

1 comments

all good advice. however, depending on your setup there are often commands you need to use over and over again with sudo, for example, wifi-menu, starting openvpn, staring cups, as I use a very minimal setup with very little that happens automatically. This scripts is for these.