Skip to content

Instantly share code, notes, and snippets.

@socheatsok78
Last active January 3, 2023 09:45
Show Gist options
  • Save socheatsok78/7915fb15cbb4d5a6ec7a6f94e9d377c6 to your computer and use it in GitHub Desktop.
Save socheatsok78/7915fb15cbb4d5a6ec7a6f94e9d377c6 to your computer and use it in GitHub Desktop.
Useful `sudoer.d` files for macOS

Multipass

# /etc/sudoers.d/multipass
Cmnd_Alias MULTIPASS = /usr/local/bin/multipass *
%admin ALL=(root) NOPASSWD:SETENV: MULTIPASS

Virtualbox

# /etc/sudoers.d/virtualbox
Cmnd_Alias VIRTUALBOX = /usr/local/bin/virtualbox * 
%admin ALL=(root) NOPASSWD:SETENV: VIRTUALBOX

OpenfortiVPN

# /etc/sudoers.d/openfortivpn
Cmnd_Alias OPENFORTIVPN = /usr/local/bin/openfortivpn *
%admin ALL=(root) NOPASSWD:SETENV: OPENFORTIVPN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment