Chef MySQL 食谱用户创建错误

问题描述 投票:0回答:1

我正在使用 https://supermarket.chef.io/cookbooks/mysql 在 Oracle Linux 上安装 mysql。创建用户=“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
1个回答
1
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.