关于LINUX审计服务Auditd systemctl重启的问题

简介:

   在RHEL7&&CENTOS7时代,默认的服务通过systemd控制,并通过systemctl命令完成启停。但是并不是所有的服务都可以完美的通过systemctl来控制,比如今天要提到的Auditd

编辑audit.rules添加规则后,当然要通过restart服务来重启生效,但是通过

1
  systemctl restart auditd

就会报如下错误:

1
2
[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大神的帮助,终于找到了如下答复:原文如下:

1
2
3
4
5
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 这种传统方式才能解决呀




本文转自 z00w00 51CTO博客,原文链接:http://blog.51cto.com/z00w00/1940135,如需转载请自行联系原作者

相关文章
|
2月前
|
安全 关系型数据库 MySQL
|
7月前
|
Linux
17.4 【Linux】systemctl 针对 timer 的配置文件
17.4 【Linux】systemctl 针对 timer 的配置文件
64 0
|
7月前
|
网络协议 关系型数据库 MySQL
17.2.4 【Linux】通过systemctl分析各服务之间的相依性
17.2.4 【Linux】通过systemctl分析各服务之间的相依性
42 0
|
7月前
|
监控 Linux Shell
17.2 【Linux】通过 systemctl 管理服务
17.2 【Linux】通过 systemctl 管理服务
51 0
|
3月前
|
Linux 应用服务中间件 数据安全/隐私保护
Linux - 非root用户使用systemctl管理服务
Linux - 非root用户使用systemctl管理服务
111 0
|
9月前
|
Linux
linux systemctl命令
systemctl管理指令 systemctl start stop restart status 服务名 systemctl指令管理的服务在 /usr/lib/systemd/system查看 查看服务开机启动状态 systemctl list-unit-files | grep服务名 设置服务开机启动 systemctl enable 服务名 关闭服务开机启动 systemctl disable 服务名 查询某个服务是否自启动 systemctl is-enabled 服务名
74 0
|
7月前
|
Linux
17.3 【Linux】systemctl 针对 service 类型的配置文件
17.3 【Linux】systemctl 针对 service 类型的配置文件
74 0
|
7月前
|
Java Linux 数据库连接
17.2.2 【Linux】通过systemctl观察系统上所有的服务
17.2.2 【Linux】通过systemctl观察系统上所有的服务
51 0
|
8月前
|
监控 Linux
百度搜索:蓝易云【Linux系统命令之systemctl命令。】
systemctl命令是Linux系统中用于管理systemd服务的命令。
121 0
|
Linux PHP
Linux:systemctl管理开机自启进程
Linux:systemctl管理开机自启进程
180 0