Can't send to audit system
OS: Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
在系统log中发现下面的错误:
Jul 26 06:35:04 hostname dbus: Can't send to audit system: USER_AVC pid=10039 uid=81 loginuid=-1 message=avc: denied { send_msg } for scontext=user_u:system_r:unconfined_t tcontext=user_u:system_r:initrc_t tclass=dbus
Jul 26 06:35:39 hostname last message repeated 7 times
Jul 26 06:36:44 hostname last message repeated 13 times
Jul 26 06:37:49 hostname last message repeated 13 times
Jul 26 06:38:54 hostname last message repeated 13 times
Jul 26 06:39:59 hostname last message repeated 13 times
这个错误由开启了selinux引起,若手动执行ntpdate也会有相似的错误
禁用selinux的方法
首选方法
修改/etc/sysconfig/selinux或/etc/selinux/config文件的SELINUX为disable,这两个是同一文件,前者是后者的一个link
重启OS即可禁用selinux
由系统不能随便重启,选用第二种方法
使用setenfore禁用selinux
setenforce 0
setenforce的使用方法如下:
usage: setenforce [ Enforcing | Permissive | 1 | 0 ]
可以使用getenforce获得当前selinux的状态
修改后执行ntpdate系统log中没有上面的错误出现,第二天观查也没有上面的错误出现
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7419833/viewspace-610787/ ,如需转载,请注明出处,否则将追究法律责任。