如何讓Linux不記錄使用者(telnet,ssh等)登陸資訊(適合實時監控OS)

tolywang發表於2007-12-01

root使用者修改配置,可以登陸 /etc/syslog.conf , 加入 auth.none

# Don't log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none;auth.none /var/log/messages


所有系統相關Log配置,都可以透過/etc/syslog.conf 來設定。

-------------------------------------------------------------------------------------------------------

node1$cat 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.
# Don't log private authentication messages!
*.info;mail.none;news.none;authpriv.none;cron.none;auth.none /var/log/messages

# The authpriv file has restricted access.
authpriv.* /var/log/secure

# Log all the mail messages in one place.
mail.* /var/log/maillog


# Log cron stuff
cron.* /var/log/cron

# Everybody gets emergency messages
*.emerg *

# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler

# Save boot messages also to boot.log
local7.* /var/log/boot.log

#
# INN
#
news.=crit /var/log/news/news.crit
news.=err /var/log/news/news.err
news.notice /var/log/news/news.notice
# Start of lines added by LSSV - DO NOT DELETE OR CHANGE THIS LINE
# installed by poin.srv on Wed Jul 14 12:10:18 CST 2004
daemon.notice /dev/console
daemon.notice /nsr/logs/messages
daemon.notice operator
local0.notice /nsr/logs/summary
local0.alert root, operator
# End of lines added by LSSV - DO NOT DELETE OR CHANGE THIS LINE

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-85066/,如需轉載,請註明出處,否則將追究法律責任。

相關文章