Apple - How do I see all my failed login attempts (macOS High Sierra)

You can retrieve the failed login with a command like the following:

For streaming data:

log stream --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog

Or, failed logins in last hour:

log show --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog --last 1h

But, this won't show the username for the failed request, only that a failure occurred.


I wanted to see Username of the failed and successful login attempts on my Mac High Sierra and ended up posting another question on SE. Later I found the answer and updated that post.

If you're still looking for a way to see usernames in logs then you need to turn on "private" mode for logs. Here is the command to do that:

sudo log config --mode "private_data:on"

Here is my post where I've posted this answer already:

Mac OS High Sierra how to see Username for the failed login attempt