change sudoers to stop asking for password when running a systemsetup comman
Was brave enough to do it myself. For future readers, add:
yourusername ALL=(ALL) NOPASSWD: /usr/sbin/systemsetup
after
## User privilege specification
##
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL
To enable passwordless sudo for all admin users on the machine:
- Run
sudo visudo
- Change the line reading
%admin ALL=(ALL) ALL
to%admin ALL=(ALL) NOPASSWD ALL
- Save changes (press Escape, type :wq! at the command prompt and hit enter).