Hacker News new | ask | show | jobs
by scrame 1116 days ago
sudo isn't exclusively for root privileges. I've set up generic users with complex home/config setups where the script itself was rather simple but relied on a lot of the environment.

also, sudo can be used to explicitly whitelist certain commands, so "killall processname" can work, but "rm - rf" wont. If you run the whole script as root, everyone who can edit can introduce a footgun.