Interview Prep/Linux/User Lifecycle, Auditing & Time Sync

What is the audit UID (auid / loginuid) and why is it important?

AdvancedProductionUser Lifecycle, Auditing & Time Sync
Answer

The auid is set at login by pam_loginuid and never changes for that session, even after sudo or su. So when alice runs sudo -i and then deletes a file as root, audit records uid=0 auid=1001(alice). That is what gives accountability for root actions. auid 4294967295 (-1, "unset") means the process was not started from a login session (daemons).

All Linux questions Roadmap: Linux

More on User Lifecycle, Auditing & Time Sync