Closed Dragooon closed 7 years ago
I've had this problem since upgrading to Sierra. Each time I up a machine through Vagrant Manager, it requests my password 4-6 times. If I do it through CLI, it only asks once.
I'm seeing this issue on Sierra as well. It looks like Vagrant actually runs 4 sudo commands when configuring NFS, so it's prompting 4 times. The terminal remembers your sudo password for a short while so it only prompts you once, but the same is not happening in the NSTask in Vagrant Manager for some reason. I haven't come up with any solution within Vagrant Manager itself yet, but this sudoers adjustment stopped it from prompting me multiple times:
Here is some info about the security ramifications of changing that option:
I can confirm that the method mentioned by @chriswayoub does suppress the password prompts. I don't know of a way to fix it in Vagrant Manager, however.
seeing this issue as well :( such a pain
Same here!
fixed using @chriswayoub solution above. and relax . . .
As anyone found a solution for this ?
Also using macOS Sierra and looking for a proper solution.
Disabling tty_tickets doesn't sound like a good idea.
Any updates on this? I'm encountering the same issue on macOS Sierra.
Looks like there are solutions to this through the Authorization Services Programming Guide but they are somewhat involved. Looks like getting NSTask to play nicely with privilege escalation is intentionally hard to force people to do it "right".
There may be a vagrant/sudo work around if you are willing to allow an escalation without a password entirely: https://askubuntu.com/a/519841 (I have not tried this myself, but seems likely to bypass this issue).
I don't think there is a good way to resolve this on our end. The "right" way would be to use privilege escalation, but in that case it's going to ask you for your password every single time regardless of whether or not it needs it for the command it is running, and I don't think that's convenient at all. There isn't a great way for us to know whether or not the command you are running actually requires privilege escalation beforehand. I think the best solution is the one mentioned in the Vagrant docs. Sorry for this inconvenient behavior, if anyone has a good solution then we can re-open this issue.
Hello! Awesome software there. I just have a little issue, I'm using a plugin for vagrant which automatically takes care of my hosts file and it requires su password which is okay but when I run the same command through Vagrant, it requests it at least 6 times before the machine runs. Is there a way to fix this?