你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux审计服务Auditd systemctl重启问题解决

[日期:2017-06-30] 来源:Linux社区  作者:z00w00 [字体: ]

在RHEL7&&CentOS7时代,默认的服务通过systemd控制,并通过systemctl命令完成启停。但是并不是所有的服务都可以完美的通过systemctl来控制,比如今天要提到的Auditd
编辑audit.rules添加规则后,当然要通过restart服务来重启生效,但是通过
systemctl restart auditd

就会报如下错误:
[root@abc]#  systemctl restart auditd
Failed to restart auditd.service: Operation refused, unit auditd.service may be requested by dependency only

因为我并没有编辑过/usr/lib/systemd/system/auditd.service 下的文件,所以不是人为修改导致服务重启失败,经过GOOGLE大神的帮助,终于找到了如下答复:原文如下:

The audit daemon must be controlled from the service command. It will decide which commands can be sent to systemctl and which ones are supported by legacy actions. So, you should do:
 
service auditd restart
 
Unfortunately, it has to be this way.

既然Steve Grubb 都不能解决这个问题,看来有些古老应用还是需要service 这种传统方式才能解决呀。

本文永久更新链接地址http://www.linuxidc.com/Linux/2017-06/145316.htm

linux
相关资讯       Linux审计服务  Auditd systemctl重启 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款