《LINUX學習:Linux審計服務Auditd systemctl重啟問題解決》要點:
本文介紹了LINUX學習:Linux審計服務Auditd systemctl重啟問題解決,希望對您有用。如果有疑問,可以聯系我們。
在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 這種傳統方式才能辦理呀.
本文永遠更新鏈接地址:
歡迎參與《LINUX學習:Linux審計服務Auditd systemctl重啟問題解決》討論,分享您的想法,維易PHP學院為您提供專業教程。