使用Vagrant 1.4.3和Vagrant::Butcher 2.1.5的Ubuntu 10.04.1 LTS。
在“vagrant up”结束时,我遇到以下错误:
...
[2014-03-17T22:50:56+00:00] INFO: Chef Run complete in 245.448117502 seconds
[2014-03-17T22:50:56+00:00] INFO: Running report handlers
[2014-03-17T22:50:56+00:00] INFO: Report handlers complete
[Butcher] Creating /home/testuser/vagrant_test/.vagrant/butcher
[Butcher] Failed to create /home/testuser/vagrant_test/.vagrant/butcher/DEV-35-51-client.pem: Vagrant::Errors::VagrantError - The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
cat /etc/chef/client.pem
Stdout from the command:
Stderr from the command:
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
厨师客户端已成功运行,我们的烹饪书籍都已安装。其中之一是“sudo”社区烹饪书,我在思考我们是否删除了vagrant用户需要执行cat以读取client.pem文件的条目。
有人能告诉我那可能是什么吗?
更新:
1)vagrant用户是“sudo”组的一部分:
$ grep sudo /etc/group
sudo:x:27:vagrant
2) sudoers文件包含一个条目,允许“sudo”用户组运行任何命令:
# This file is managed by Chef.
# Do NOT modify this file directly.
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# User privilege specification
root ALL=(ALL:ALL) ALL
nagios ALL=(ALL) NOPASSWD: /usr/local/nagios/libexec/
# Members of the group 'admin' may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d