Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

documentation: sudoers example for macOS is incorrect, needs updating #13582

Open
bad opened this issue Jan 27, 2025 · 1 comment
Open

documentation: sudoers example for macOS is incorrect, needs updating #13582

bad opened this issue Jan 27, 2025 · 1 comment

Comments

@bad
Copy link

bad commented Jan 27, 2025

website/content/docs/synced-folders/nfs.mdx mentions:

For macOS, sudoers should have this entry:

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

However, current vagrant (2.4.3) on macOS invokes nfs with at least two different arguments:

/usr/sbin/nfsd status
/usr/sbin/nfsd update

This then causes sudo to ask for a password during "vagrant up" because these commands aren't whitelisted.

Apparently this was introduced in GH-13490 for vagrant 2.4.2.

I have locally changed the relevant line to:

Cmnd_Alias VAGRANT_NFSD = /sbin/nfsd ^(restart|status|update)$
to allow the additional arguments.

There is another mention of the same Cmd_Alias in contrib/sudoers/osx that would need updating too.

@Remiz
Copy link

Remiz commented Jan 31, 2025

Thank you for the updated command, I was wondering why I needed to enter my password since upgrading and it was getting really annoying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants