【问题标题】:Chef MySQL cookbook user creation errorChef MySQL 食谱用户创建错误
【发布时间】: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


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-07-17
    • 1970-01-01
    • 2014-11-06
    • 2013-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多