我有一个流浪的项目,为我准备好了。
对于ssh设置,我使用:
config.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
config.ssh.forward_agent = true
config.ssh.forward_x11 = true问题是我用GUI启动了VM
vb.gui = true已经安装了ansible lightdm-gtk-greeter设置,
但我被要求提供ubuntu的用户密码,而不是流浪汉用户。
这就是我想要解决的问题。
作为解决办法(因为我不知道ubuntu的用户密码),我登录到vm并手动更改它。流浪汉苏多·库班图,但我还是想知道背后的秘密。
这是我的Vagrantfile文件
https://github.com/valentin-nasta/development-environment/blob/master/Vagrantfile

发布于 2016-04-01 13:27:48
似乎流浪用户没有添加到正式的vagrant /信任盒https://atlas.hashicorp.com/ubuntu/boxes/trusty64上的sudoers中。
修复方法是将这些行添加为内联shell配置:
# provision
config.vm.provision :shell, inline: <<-SHELL
# Set up sudo
echo 'vagrant ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/vagrant
chmod 0440 /etc/sudoers.d/vagrant
# Setup sudo to allow no-password for "sudo" commands
usermod -a -G sudo vagrant
SHELLhttps://stackoverflow.com/questions/36355254
复制相似问题