Quick Linux Tip #96:
Question: Who accessed /etc/shadow and when, over the last week?
Try: sudo aureport --file --start week-ago | grep shadow
Info: aureport summarizes audit log reports by file access. Using ausearch -i translates UIDs and syscalls into human-readable text, while auid tracks the original login user even across sudo sessions.
Examples:
- $
sudo aureport --user --summary# Summary of user activity - $
sudo ausearch -ua linuxteck --start today# Search audit events for specific user - $
sudo aureport --failed# Review all failed security events
Note: Requires auditd active with file watch rules enabled (auditctl -w). The audit user ID (auid) remains invariant during sudo, ensuring precise accountability for compliance frameworks (SOC 2, PCI).
Leave a Reply