Back to library
Grc Intermediate Free

Linux Audit Framework — report failed logins and root activity for today

Linux Audit Framework — report failed logins and root activity for today

Audit CLI / Audit Procedures

Log in to save

Command

aureport --login --start today --end now | grep -E "(failed|root)"

Syntax

aureport --<report_type> --start <date> --end <date>

Use case

Compliance audit evidence collection — demonstrating that authentication events are logged and retained as required by ISO 27001 A.8.15 or PCI-DSS Req 10.

Explanation

Linux Audit Framework reporting (auditd): • aureport → Generates summary reports from audit.log • --login → Authentication events • --start/--end → Time range filters • Requires auditd service running Other useful reports: aureport --file → File access events aureport --exec → Program execution aureport --anomaly → Anomaly detection events aureport --auth → All authentication events For compliance: retain audit logs per policy (PCI-DSS: 1 year, ISO 27001: defined in policy)

Example output

Login Report
============================================
# date    time    auid   host    term   exe  success event
1 05/08/26 09:02:15 root   ?       sshd   2 (failed) 1012
2 05/08/26 09:15:33 jdoe   ssh     sshd   1 (success) 1089
3 05/08/26 11:30:01 root  console  login  1 (success) 1234

More examples

Primary example

aureport --login --start today --end now | grep -E "(failed|root)"

Compliance audit evidence collection — demonstrating that authentication events are logged and retained as required by ISO 27001 A.8.15 or PCI-DSS Req 10.

linux audit aureport auditd compliance logging grc