Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Add sudoers tip from @yannickoo.
Browse files Browse the repository at this point in the history
  • Loading branch information
tharna committed Oct 6, 2017
1 parent 55ab2b3 commit 0a5e0a3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tips.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
Useful things
### Useful things

Add this to your /etc/sudoers (it is recommended to use `visudo` command to edit that file!) to skip sudo password prompts during vagrant operations:
```
# Vagrant sudoers config
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
Cmnd_Alias VAGRANT_HOSTS_ADD = /bin/sh -c echo "*" >> /etc/hosts
Cmnd_Alias VAGRANT_HOSTS_REMOVE = /bin/sed -i -e /*/ d /etc/hosts
%admin ALL=(root) NOPASSWD: VAGRANT_EXPORTS_ADD, VAGRANT_NFSD, VAGRANT_EXPORTS_REMOVE, VAGRANT_HOSTS_ADD, VAGRANT_HOSTS_REMOVE
```


Attention: This might be out of date. Updated version coming soon!

Expand Down

0 comments on commit 0a5e0a3

Please sign in to comment.