chef mysql cookbook用户创建错误

q9yhzks0  于 2021-06-20  发布在  Mysql
关注(0)|答案(1)|浏览(256)

我在用https://supermarket.chef.io/cookbooks/mysql 在oraclelinux上安装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

我错过了什么?

n8ghc7c1

n8ghc7c11#

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

相关问题