1. 程式人生 > >關於LINUX審計服務Auditd systemctl重啟的問題

關於LINUX審計服務Auditd systemctl重啟的問題

auditd

在RHEL7&&CENTOS7時代,默認的服務通過systemd控制,並通過systemctl命令完成啟停。但是並不是所有的服務都可以完美的通過systemctl來控制,比如今天要提到的Auditd

編輯audit.rules添加規則後,當然要通過restart服務來重啟生效,但是通過

 systemctl restart auditd

就會報如下錯誤:

[[email protected]]#  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 這種傳統方式才能解決呀



本文出自 “丁胖胖的BLOG” 博客,請務必保留此出處http://z00w00.blog.51cto.com/515114/1940130

關於LINUX審計服務Auditd systemctl重啟的問題