Chef MySQL Cookbook用户创建错误

时间:2018-08-22 23:27:11

标签: mysql chef chef-recipe

我正在使用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

我想念什么?

1 个答案:

答案 0 :(得分:0)

事实证明,我正在使用的社区食谱创建了一个普通用户“ MySQL”,我需要将其更改为服务用户以通过我们公司的安全扫描。