/var/log/secure 日志不记录问题
2012-05-10 23:49
267 查看
直接删除日志文件的时候,对应的服务需要重启。运行命令:service syslog restart ;service sshd restart 后正常。
顺便复习下ssh在syslog中的设置的知识。
1、/etc/ssh/sshd_config 中的设置:(即:SyslogFacility 设为AUTHPRIV)
[root@mail ~]# more /etc/ssh/sshd_config
#Port 22
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
<strong>SyslogFacility AUTHPRIV</strong>
#LogLevel INFO
#就是把sshd的日志定义在authriv.info级别。
2、配合/etc/syslog.conf中的设置:
[root@mail ~]# more /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Dont log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
<strong>authpriv.* /var/log/secur</strong>e
重新启动sshd和syslog
顺便复习下ssh在syslog中的设置的知识。
1、/etc/ssh/sshd_config 中的设置:(即:SyslogFacility 设为AUTHPRIV)
[root@mail ~]# more /etc/ssh/sshd_config
#Port 22
# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
<strong>SyslogFacility AUTHPRIV</strong>
#LogLevel INFO
#就是把sshd的日志定义在authriv.info级别。
2、配合/etc/syslog.conf中的设置:
[root@mail ~]# more /etc/syslog.conf
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Dont log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
<strong>authpriv.* /var/log/secur</strong>e
重新启动sshd和syslog
相关文章推荐
- Centos 6.4 /var/log/secure 日志不记录问题
- /var/log/secure 日志不记录问题
- /var/log/secure不记录日志
- centos 6.4 /var/log/secure 不记录日志的問題
- centos 6.4 /var/log/secure 不记录日志的問題
- 记录华为、魅族手机无法打印 Log 日志的问题
- Secure crt log session and click select ( secure crt 自动记录日志 正则表达式 单击 双击 选择 )
- Centos7中删除/var/log/message后如何重新记录日志
- /var/log/secure 直接删除之后不再写入记录解决方法和限制错误登陆ssh功能的脚本
- 记录华为、魅族手机无法打印 Log 日志的问题
- tomcat web.log 系统日志记录文件过大问题修改
- 魅族手机无法打印Log日志的问题
- 华为手机不能打印Log日志问题
- Python的log模块日志写两遍的问题
- 使用hive重定向导出的数据文件中包含WARN日志记录问题
- c#实现记录每个线程的log日志
- UBUNTU开启CRONTAB日志记录及解决NO MTA INSTALLED, DISCARDING OUTPUT问题
- /var/log目录下的20个Linux日志文件功能详解
- /var/log目录下的20个Linux日志文件功能详解
- /var/log/ 日志文件功能详解