错误:
Chef::Exceptions::UserIDNotFound
--------------------------------
cannot determine user id for 'builduser', does the user exist on this system?
这是我的(修剪)厨师食谱:
if node['platform'] == 'centos'
package 'yum-utils'
execute 'yum-config-manager --enable cr'
end
include_recipe "python::source"
...
## Setup key for jenkins... https://supermarket.chef.io/cookbooks/ssh_authorized_keys
ssh_authorize_key 'builduser@supermarket.com' do
key 'AAAAB3Nz...hiOQ=='
user 'builduser'
group 'builduser'
end
此用户 * 不是 * 由该配方创建的,但已存在于此CentOS虚拟机连接到的Active Directory中。
有人知道如何告诉厨师去阅读这从活动目录?
先谢谢你
3条答案
按热度按时间khbbv19g1#
您可能遇到了可怕的“nsswitch.conf reload”问题。它第二次工作还是总是失败?如果它第二次工作,可能是因为
/etc/nsswitch.conf
只是在Chef运行的早些时候更新的,并且由于libc缓存nsswitch数据库配置的方式,这些更改在Chef进程重新启动之前是不可见的。如果它总是失败,请检查计算机是否具有正确的nsswitch配置以使AD用户可见。仅在PAM上链接到AD不足以使用户条目正常工作。lrl1mhuk2#
我的解决方法是创建root拥有的文件资源,然后将其chown给用户。不知怎么的... chown似乎对AD没有问题。
不是最漂亮的解决方案...但很有效。
n1bvdmb63#
1.将用户密钥重定向到不同区域;/etc/ssh/keys/例如:
编码类似
1.将它们更改为root.root和400,因为只有sshd需要读取它们
1.反正都是厨师管
1.米勒时间