From 8b1573c5361200bd0af63e85e50cd29db8f5abbb Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Fri, 21 Mar 2014 20:04:35 -0300 Subject: [PATCH] doc: Let everyone know about the new `vagrant lxc sudoers` command --- README.md | 9 ++++++--- lib/vagrant-lxc/command/root.rb | 2 +- lib/vagrant-lxc/command/sudoers.rb | 1 - 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 8f3665f..6c5a890 100644 --- a/README.md +++ b/README.md @@ -128,9 +128,12 @@ end ### Avoiding `sudo` passwords This plugin requires **a lot** of `sudo`ing since [user namespaces](https://wiki.ubuntu.com/UserNamespace) -are not supported on mainstream kernels. Have a look at the [Wiki](https://github.com/fgrehm/vagrant-lxc/wiki/Avoiding-'sudo'-passwords) -to find out how to work around that specially if you are running an OS with `sudo` -< 1.8.4 (like Ubuntu 12.04) as you might be affected by a bug. +are not supported on mainstream kernels. To work around that, you can use the +`vagrant lxc sudoers` command which will create a file under `/etc/sudoers.d/vagrant-lxc-` +whitelisting all commands required by `vagrant-lxc` to run. + +If you are interested on what will be generated by that command, please check +[this code](lib/vagrant-lxc/commands/sudoers.rb#L58-L81). ### Base boxes diff --git a/lib/vagrant-lxc/command/root.rb b/lib/vagrant-lxc/command/root.rb index cd4bd07..c7f6f7f 100644 --- a/lib/vagrant-lxc/command/root.rb +++ b/lib/vagrant-lxc/command/root.rb @@ -3,7 +3,7 @@ module Vagrant module Command class Root < Vagrant.plugin("2", :command) def self.synopsis - 'LXC setup' + 'vagrant-lxc specific commands' end def initialize(argv, env) diff --git a/lib/vagrant-lxc/command/sudoers.rb b/lib/vagrant-lxc/command/sudoers.rb index a17cf7c..4c63bdd 100644 --- a/lib/vagrant-lxc/command/sudoers.rb +++ b/lib/vagrant-lxc/command/sudoers.rb @@ -4,7 +4,6 @@ module Vagrant module LXC module Command class Sudoers < Vagrant.plugin("2", :command) - def execute options = { user: ENV['USER'] }