todd-dsm / mac-ops

QnD Automation to build a MacBook Pro for DevOps
MIT License
11 stars 7 forks source link

adjust sudoers #8

Closed todd-dsm closed 6 years ago

todd-dsm commented 6 years ago

Remove the admin group and expand $USER; the result should be roughly:

# root and users in group wheel can run anything on any machine as any user
...
#%admin     ALL = (ALL) NOPASSWD: ALL
"$USER"     ALL = (ALL) NOPASSWD: ALL
todd-dsm commented 6 years ago

bootstrap now drops a file, with the users username in /etc/sudoers.d/:

$ sudo cat /etc/sudoers.d/vagrant 
vagrant ALL=(ALL) NOPASSWD:ALL