From 17cce69c3866d7bbd31de28a33666f6ecd16bbd1 Mon Sep 17 00:00:00 2001 From: Konstantin Burnaev Date: Sun, 25 May 2014 08:18:25 +1000 Subject: [PATCH 1/2] Minor documentation update. --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 287644d..c17b876 100644 --- a/README.md +++ b/README.md @@ -92,15 +92,26 @@ config.hostmanager.ip_resolver = proc do |vm, resolving_vm| end ``` +Passwordless sudo +----------------- + +Add the following snippet to the sudoers file (for example, to +```/etc/sudoers.d/vagrant_hostmanager``` to make it stop asking +password when updating hosts file (replace ```/home/user``` with your +actual home directory): + + Cmnd_Alias VAGRANT_HOSTMANAGER_UPDATE = /bin/cp /home/user/.vagrant.d/tmp/hosts.local /etc/hosts + %sudo ALL=(root) NOPASSWD: VAGRANT_HOSTMANAGER_UPDATE + Windows support --------------- -Hostmanager will detect Windows guests and hosts and use the appropriate +Hostmanager will detect Windows guests and hosts and use the appropriate path for the ```hosts``` file: ```%WINDIR%\System32\drivers\etc\hosts``` By default on a Windows host, the ```hosts``` file is not writable without elevated privileges. If hostmanager detects that it cannot overwrite the file, -it will attempt to do so with elevated privileges, causing the +it will attempt to do so with elevated privileges, causing the [UAC](http://en.wikipedia.org/wiki/User_Account_Control) prompt to appear. ### UAC limitations From bb6e0efb7c10a4bb5a2c171bee2d45f4487d22e5 Mon Sep 17 00:00:00 2001 From: Konstantin Burnaev Date: Sun, 25 May 2014 08:20:02 +1000 Subject: [PATCH 2/2] Fixed a minor typo in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c17b876..11ad583 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Passwordless sudo ----------------- Add the following snippet to the sudoers file (for example, to -```/etc/sudoers.d/vagrant_hostmanager``` to make it stop asking +```/etc/sudoers.d/vagrant_hostmanager```) to make it stop asking password when updating hosts file (replace ```/home/user``` with your actual home directory):