When (re)starting a virtual machine image with Vagrant that uses NFS instead of the VM provider specific local sharing, you get the error message
“Pruning invalid NFS exports. Administrator privileges will be required…”
and you need to enter the root password as the
/etc/exports file gets changed.
Open the sudoers file.
Go to the end of the file (ctrl+f).
(=>Vim insert mode)
Cmnd_Alias VAGRANT_EXPORTS_ADD = /usr/bin/tee -a /etc/exports
(as per: https://docs.vagrantup.com/v2/synced-folders/nfs.html, also check https://github.com/mitchellh/vagrant/issues/6022 for Linux – not tested on OS X)
Confirm the changes
In a new terminal, you shouldn’t be prompted for the admin password the next time you run
As per Hashicorp, the Vagrant provider (i.e. the company of Mitchell Hashimoto), “default shared folder implementations (such as VirtualBox shared folders) have high performance penalties” and NFS can be a much better performing solution.
To enable it on you *ix host ( (-1) for Windows, again), you need to have nfsd installed and for every VM export Vagrant creates an entry in the file
/etc/exports, which requires root privileges. To gain these privileges, Vagrant asks for your password.
The sudoers file changes allow you specifiying not be asked anymore.