■ ログ
* root権限が閲覧できない * /var/log/ 配下に様々なログが格納されている
/var/log/ 配下のログ一覧
`# | `ログ | `説明 | `備考 |
1 | secure | 認証関連ログ。sshの認証成功・失敗などセキュリティ上大切な情報が格納されている | |
2 | lastlog | ユーザ最終ログイン情報 | テキストじゃなくバイナリ(詳細は、以下「lastコマンド」参照) |
3 | messages | システム・サーバ全般のログ |
syslog
* OSからのメッセージをファイル保存していく仕組みhttps://thinkit.co.jp/article/724/1
https://eng-entrance.com/linux-log-syslog
■ ログ関連のコマンド
lastコマンド
* /var/log/lastlog は、テキストじゃなくバイナリ形式なので、それを閲覧するコマンド * root権限不要OS再起動した履歴の閲覧
$ last reboot reboot system boot (略) Thu Sep 15 23:53 - 00:56 (1+01:03) reboot system boot (略) Thu Sep 15 23:31 - 23:53 (00:22) wtmp begins Thu Sep 15 23:31:01 2016