mysql - Chef MySQL Recipe 用户创建错误

标签 mysql chef-infra chef-recipe

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

我的 Recipe :

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

我错过了什么?

最佳答案

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

关于mysql - Chef MySQL Recipe 用户创建错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51976468/

相关文章:

MySQL group_concat 和 concat

mysql - 如何通过属性连接两个表

chef-infra - 如果要安装的所需软件包不存在,如何告诉 Chef 采取措施?

指定路径的Java JDK静默安装

chef-infra - Chef 覆盖同一 Recipe 中另一个 Recipe 的属性

chef-infra - 使用 Chef 管理网站用户、虚拟主机和 PHP-FPM 池

chef-infra - 如何在RHEL上使用chef安装JDK8

php - 将秒转换为 HH :MM:SS

mysql - 如何将 2 个数据库(db 文件)合并为一个数据库文件?

selenium - Chef Selenium : Strange error when I go to the hub ip:4444/wd/hub