Skip to content

Instantly share code, notes, and snippets.

@paultibbetts
Last active January 30, 2016 15:44
Show Gist options
  • Save paultibbetts/56dc6c87bc3ede130aed to your computer and use it in GitHub Desktop.
Save paultibbetts/56dc6c87bc3ede130aed to your computer and use it in GitHub Desktop.
Allows Vagrant (1.8.1) passwordless access to modify /etc/exports - tested on Mac
# Add this to the sudoers file with `sudo visudo`
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart
Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment