2014-02-26 41 views
-1

我試圖改變爲我的辦公室創建的流浪盒。目前,與大多數框一樣,運行vagrant ssh將用戶登錄爲vagrant,但團隊成員不得不使用su - xxadmin切換到我們的主管理員用戶。更改vagrant ssh用戶創建權限錯誤

在我Vagrantfile,我說:config.ssh.username = "xxadmin",後來我跑的時候vagrant up開始接受普通流浪錯誤:

[default] Configuring and enabling network interfaces... 
The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

sed -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/network/interfaces > /tmp/vagrant-network-interfaces 

Stdout from the command: 



Stderr from the command: 

sudo: no tty present and no askpass program specified 

和運行vagrant halt時:

[default] Attempting graceful shutdown of VM... 
The following SSH command responded with a non-zero exit status. 
Vagrant assumes that this means the command failed! 

shutdown -h now 

Stdout from the command: 



Stderr from the command: 

sudo: no tty present and no askpass program specified 

這是怎麼回事?爲什麼簡單地更改ssh用戶創建這些錯誤?我如何找到解決方案?

規格:

  • OS X小牛(主機)
  • 流浪1.3.5
  • 的virtualbox 4.3.2
  • 的Debian 7喘息(VM客戶端)

回答

2

在你的盒子,你需要通過運行visudo修改你的sudoers文件並添加以下內容:

Defaults !requiretty 
0

我一直運行到這一錯誤,直到我確信,我的用戶的NOPASSWD sudoers文件條目沒有被squashed