Bullseyeオペレーティングシステムのauth.logファイル

Bullseyeオペレーティングシステムのauth.logファイル

私は持っていますDebian GNU/Linux 11(ブルスアイ)/var/log/auth.logファイルには以前の実行ログではなく現在の実行ログのみが含まれているため、アクティビティを確認するには以前の実行ログを保存する必要があります。

どうすればいいですか?

私は実際に/etc/logrotate.d/syslog-ngDebian GNU / Linux 11(bullseye)とDebian GNU / Linux 10(Buster)を比較しました。なぜなら、Buster OSには一週間のログがあり、両方とも比較の結果同じだったからです。

Bullseye OSのコードは/etc/logrotate.d/syslog-ng次のとおりです。

{
rotate 7
daily
missingok
notifempty
delaycompress
compress
postrotate
invoke-rc.d syslog-ng reload > /dev/null
endscript
}

/var/log/mail.info
/var/log/mail.warn
/var/log/mail.err
/var/log/mail.log
/var/log/daemon.log
/var/log/kern.log
/var/log/auth.log
/var/log/user.log
/var/log/lpr.log
/var/log/cron.log
/var/log/debug
/var/log/messages
/var/log/error
{
rotate 4
weekly
missingok
notifempty
compress
delaycompress
sharedscripts
postrotate
invoke-rc.d syslog-ng reload > /dev/null
endscript
}```
and the code of logrotate.conf of bullseye os is
:/etc$ sudo cat logrotate.conf
# see "man logrotate" for details

# global options do not affect preceding include directives

# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
#dateext

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# system-specific logs may also be configured here.

ベストアンサー1

おすすめ記事