【发布时间】:2018-09-20 23:05:33
【问题描述】:
我正在使用https://supermarket.chef.io/cookbooks/mysql 在 Oracle Linux 上安装 mysql。创建 user="mysql" 时出错。 这是错误:
× xccdf_org.cisecurity.benchmarks_rule_7.2_Disable_System_Accounts: Disable System Accounts (1 failed)
✔ /etc/passwd with user =~ /^(?!root|sync|shutdown|halt|oemagent|epg_vcac|MWadm|MWwls|apache|[+-]@).*$/ entries should not be empty
× /etc/passwd with user =~ /^(?!root|sync|shutdown|halt|oemagent|epg_vcac|MWadm|MWwls|apache|[+-]@).*$/ uid to_i < 500 shell != "/sbin/nologin" entries should be empty
expected `[#<struct user="mysql", password="x", uid="27", gid="27", desc="MySQL Server", home="/var/lib/mysql", shell="/bin/bash", count=nil, usernames=nil, username=nil, content=nil>].empty?` to return true, got false
我的食谱:
mysql_service 'default' do
version node[:mysql][:version]
bind_address '0.0.0.0'
port '3306'
data_dir node[:mysql][:data_dir]
error_log node[:mysql][:log_dir]
initial_root_password node[:mysql][:password]
action [:create, :start]
end
我错过了什么?
【问题讨论】:
-
您如何准确地创建用户?错误看起来像是来自某种验证器。
-
我假设厨师创建了用户。
-
它不是粘贴资源的输出。你如何经营你的厨师客户?
标签: mysql chef-infra chef-recipe