diff --git a/plugins/hosts/bsd/host.rb b/plugins/hosts/bsd/host.rb index a8dc08504..c31b3e6ea 100644 --- a/plugins/hosts/bsd/host.rb +++ b/plugins/hosts/bsd/host.rb @@ -122,7 +122,7 @@ module VagrantPlugins output.split("\n").each do |line| line.gsub!('"', '\"') line.gsub!("'", "'\\\\''") - system(%Q[sudo su root -c "echo '#{line}' >> /etc/exports"]) + system(%Q[sudo -s -- "echo '#{line}' >> /etc/exports"]) end # We run restart here instead of "update" just in case nfsd