欢迎访问 生活随笔!

生活随笔

当前位置: 首页 >

eulerOS 欧拉OS 审计修复日记

发布时间:2024/1/8 43 豆豆
生活随笔 收集整理的这篇文章主要介绍了 eulerOS 欧拉OS 审计修复日记 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

因为reboot卡住,查看启动日志:

cat /var/log/boot.log

[FAILED] Failed to start Security Auditing Service.

See 'systemctl status auditd.service' for details.

Starting Update UTMP about System Boot/Shutdown...

看 Error - /etc/audit/auditd.conf is world writable

可能和前几天手贱,修改/etc权限有关。

对比正常机器修复权限:

 [root@localhost ~]# ll -R /etc/audit/

/etc/audit/:

总用量 20K

-rw-r-----. 1 400 root 856 9月 30 2021 auditd.conf

-rw-r-----. 1 root root 68 3月 26 09:05 audit.rules

-rw-r-----. 1 root root 127 9月 30 2021 audit-stop.rules

drwxr-x---. 2 root root 4.0K 3月 26 16:11 plugins.d

drwxr-x---. 2 root root 4.0K 3月 26 16:10 rules.d

/etc/audit/plugins.d:

总用量 8.0K

-rw-r-----. 1 root root 358 9月 30 2021 af_unix.conf

-rw-r--r--. 1 root root 170 4月 5 2017 sedispatch.conf

/etc/audit/rules.d:

总用量 0

-rw-------. 1 root root 0 3月 26 16:10 audit.rules

修复命令:

chmod 640 /etc/audit/auditd.conf

chmod 750 /etc/audit/rules.d

...没记录更多

关于权限修复还有一个狠招,在此记录下来:

到正常机器上导出权限:getfacl -R /etc > acl.bak

getfacl: Removing leading '/' from absolute path names

可能是出于安全考虑,OS不希望我们直接操作根目录吧。

cd /etc

getfacl -R . > acl.bak

然后到坏机器上恢复一下:

setfacl --restore acl.bak

重启:systemctl restart auditd.service

不管用。唉,重装吧:

dnf remove audit

dnf install audit

systemctl start auditd.service

OK了,虚拟世界的极限大招还是 大不了从头再来。

总结

以上是生活随笔为你收集整理的eulerOS 欧拉OS 审计修复日记的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。