LoginSignup
1
0

More than 1 year has passed since last update.

/var/log/auth.logがない話

Posted at

SSH設定しているときに、/var/log/auth.logを確認しようとおもったところ下記エラーが出ました。

# cat /var/log/auth.log
cat: /var/log/auth.log: No such file or directory

そもそもログが出力されていないので、一瞬焦りましたがもしかして/var/log/secureのほうに出力されているのでは?と思い、確認したらビンゴでした。

このログの出力設定を行っているのが、/etc/rsyslog.confになります。なので、viで編集していくことで/var/log/auth.logにも書き換えることもできます。
今のまま/var/log/secureでもよいとのことであれば、編集は不必要です。

# cat /etc/rsyslog.conf
~省略~
# The authpriv file has restricted access.
authpriv.*                                              /var/log/secure

                               ↑ここを/var/log/auth.logへ書き換え

# systemctl status rsyslog.service
# systemctl restart rsyslog.service

プロセスの再起動をかけ、設定反映されていること確認

以上、/var/log/auth.logがない話でした。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0