7.7. Searching the Audit Log Files

The ausearch utility allows you to search Audit log files for specific events. By default, ausearch searches the /var/log/audit/audit.log file. You can specify a different file using the ausearch options -if file_name command. Supplying multiple options in one ausearch command is equivalent to using the AND operator.

Example 7.6. Using ausearch to search Audit log files

To search the /var/log/audit/audit.log file for failed login attempts, use the following command:
~]# ausearch --message USER_LOGIN --success no --interpret
To search for all account, group, and role changes, use the following command:
~]# 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
To search for all logged actions performed by a certain user, using the user's login ID (auid), use the following command:
~]# ausearch -ua 500 -i
To search for all failed system calls from yesterday up until now, use the following command:
~]# ausearch --start yesterday --end now -m SYSCALL -sv no -i
For a full listing of all ausearch options, see the ausearch(8) man page.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.