Skip to content

Instantly share code, notes, and snippets.

@rmm5t
Last active February 1, 2019 16:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmm5t/5f0d33b360bf5e543e8b9bee8d401340 to your computer and use it in GitHub Desktop.
Save rmm5t/5f0d33b360bf5e543e8b9bee8d401340 to your computer and use it in GitHub Desktop.
Add wheel group to sudoers on macOS
# Add current user to wheel group
sudo dseditgroup -o edit -a $USER -t user wheel
# Add wheel to sudoers
sudo su -
cd /etc
chmod 660 sudoers
vi /etc/sudoers
: <<'END_COMMENT'
# add the following
wheel ALL = (ALL) ALL
%wheel ALL = (ALL) NOPASSWD: ALL
END_COMMENT
chmod 440 sudoers
# check to make sure your user is part of the group
dscacheutil -q group -a name admin
dscacheutil -q group -a name wheel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment