当给--ssh-user&时,为什么会通过利刃vsphere提示输入sudo密码? --ssh-password参数? [英] Why am I getting prompted for sudo password via knife-vsphere when giving --ssh-user & --ssh-password params?

查看:118
本文介绍了当给--ssh-user&时,为什么会通过利刃vsphere提示输入sudo密码? --ssh-password参数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的vCenter环境中使用刀刀式vSphere。我有一个脚本工作,该脚本从模板启动VM,然后对其进行引导并运行食谱来完成操作。但是,系统提示我提供一个sudo密码。这是预期的吗?我提供了 --ssh-user和 --ssh-password参数,并在提示时输入相同的密码,然后继续构建厨师。

I'm trying to get knife-vsphere working in my vCenter environment. I have a script working that spins up a VM from a template then bootstraps it and runs cookbook recipes to completion. However, I get prompted to supply a sudo password. Is this expected? I supplied the '--ssh-user' and '--ssh-password' params and, upon being prompted, I'm typing the same password in and then chef build continues.

没有办法使它放开吗?

isn't there a way to make this hands off? what may I have missed?

谢谢!

推荐答案

在评论中,提示sudo的是操作系统(不是Chef或刀子)。不想那样,您必须在模板中配置用户,以便在使用sudo时不提示输入密码。

As pointed out in the comments, it was the OS (not Chef or knife) that was prompting for sudo. Don't want that, you have to configure the user in the template to not be prompted for passwords when using sudo.

https://askubuntu.com/questions/192050/how-to-run-sudo-command-with-no-密码

感谢rhashimoto。

Thanks rhashimoto.

这篇关于当给--ssh-user&时,为什么会通过利刃vsphere提示输入sudo密码? --ssh-password参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆