Testing which accounts can escalate.
What gives it away'user NOT in sudoers' entries for accounts that have never attempted sudo before.
ATT&CK T1548.003Nothing matches that yet. Tell us what you were looking for and it goes on the list.
sudo / su · Event authentication failure
Someone tried to escalate privileges and gave the wrong password, or tried to use sudo without permission. A typo looks identical to a probe — the difference is who the account is and whether they were entitled to escalate at all.
Also written as authentication failure lognamesudo authentication failuresu authentication failure3 incorrect password attempts
An administrator password was typed incorrectly. Normal if it was you.
Separate the two cases sharply. A wrong password from someone who does have sudo rights is a typo. A 'user is not in the sudoers file' message is someone attempting escalation they were never granted, and that deserves a conversation regardless of intent.
Sanitised. Addresses come from the RFC 5737 documentation ranges.
Aug 28 09:46:31 web-01 sudo: pam_unix(sudo:auth): authentication failure; logname=jbrooks uid=1000 euid=0 tty=/dev/pts/1 ruser=jbrooks rhost= user=jbrooks
Aug 28 09:46:40 web-01 sudo: mchen : user NOT in sudoers ; TTY=pts/2 ; PWD=/home/mchen ; USER=root ; COMMAND=/bin/bash Everything else in the log line is context.
authentication failureWrong password. Usually a typo. user NOT in sudoersThe account has no sudo rights and tried anyway. Worth investigating. 3 incorrect password attemptsRepeated failures in one session. More than a slip. command not allowedThe account has sudo rights but not for that command. Most of the time it is one of these.
What gives it away'user NOT in sudoers' entries for accounts that have never attempted sudo before.
ATT&CK T1548.003What gives it awayEscalation attempts from an account shortly after an unusual login, particularly from an unfamiliar source.
ATT&CK T1078What gives it away'command not allowed' entries where the account has restricted sudo rights and is testing the boundaries.
ATT&CK T1548.003grep -E 'sudo:.*(authentication failure|NOT in sudoers|command not allowed)' /var/log/auth.log grep 'NOT in sudoers' /var/log/auth.log | grep -oP '^\S+ \S+ \S+ \S+ \s*\K\S+' | sort | uniq -c | sort -rn index=linux sourcetype=linux_secure ("NOT in sudoers" OR "authentication failure") | stats count by user host | sort -count The account tried to use sudo without having been granted the right. It is often simple curiosity or someone forgetting which server they are on, and the message includes 'This incident will be reported' precisely because sudo treats it as noteworthy. Worth a quick conversation with the user — repeated attempts, or attempts from an account that just logged in from somewhere unusual, deserve more than that.
Most often the user typed their own password when sudo wanted a different account's, or a password manager filled the wrong field. It also happens when PAM is configured with an unexpected authentication order. If it is persistent for one user, check whether their account is locked or their password has expired.
Last reviewed 28 August 2026