Created
December 8, 2015 00:54
-
-
Save onema/eb5fbd8200882569a43b to your computer and use it in GitHub Desktop.
Prevent vagrant from asking for password
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports' >> /etc/sudoers" | |
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd restart' >> /etc/sudoers" | |
sudo /bin/bash -c "echo 'Cmnd_Alias VAGRANT_EXPORTS_REMOVE = /usr/bin/sed -E -e /*/ d -ibak /etc/exports' >> /etc/sudoers" | |
sudo /bin/bash -c "echo '%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE' >> /etc/sudoers" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment