Show Table of Contents
5.7. Audit ログファイルの検索
ausearch ユーティリティーを使うと、Audit ログファイル内で特定のイベントを検索できます。デフォルトでは、ausearch は
/var/log/audit/audit.log ファイルを検索します。ausearch options -if file_name コマンドを使うと、別のファイルを指定できます。ausearch コマンドで複数のオプションを渡すと、フィールドタイプの間で AND 演算子を使用したり、同じフィールドタイプの複数のインスタンス間で OR を使用したりするのに相当します。
例5.7 ausearch を使った Audit ログファイルの検索
失敗したログイン試行を
/var/log/audit/audit.log ファイル内で検索するには、以下のコマンドを実行します。
~]# ausearch --message USER_LOGIN --success no --interpret
すべてのアカウント、グループ、役割変更を検索するには、以下のコマンドを実行します。
~]# ausearch -m ADD_USER -m DEL_USER -m ADD_GROUP -m USER_CHAUTHTOK -m DEL_GROUP -m CHGRP_ID -m ROLE_ASSIGN -m ROLE_REMOVE -i
特定のユーザーがそのユーザーのログイン ID (
auid) を使って実行したログインのアクションをすべて検索するには、以下のコマンドを実行します。
~]# ausearch -ua 1000 -i
昨日から現在までに失敗したすべてのシステムコールを検索するには、以下のコマンドを実行します。
~]# ausearch --start yesterday --end now -m SYSCALL -sv no -i
For a full listing of all
ausearch options, refer to the ausearch(8) man page.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.