Fast and painless NFS for your Vagrant environment

If you are using NFS with Vagrant you are probably tired of password prompts. But a few modifications to /etc/sudoers file can help you!

To edit /etc/sudoers file always use visudo. This way you won’t save the file with errors and you don’t damage your system.

And input the following for Fedora:

How does that work? Vagrant runs the above mentioned commands to edit the /etc/exports file so we just let it to do so without asking for root permissions. To know the right commands you need to scan the Vagrant source code, but there is also a /contrib folder in the Vagrant repository that tries to gather information such as this one (the above snipped is taken from there). Note that this snipped allows the password-less NFS for vagrant group. You can change the group to the one you like or add yourself to this group with sudo usermod -a -G vagrant USERNAME.

If you still need to set up NFS, read my previous post on setting NFS on Fedora.

Leave a comment

Your email address will not be published. Required fields are marked *