Where can I find failed login attempts using macOS mojave?
I am trying to locate security logs for all login attempts. I am using macOS Mojave.
I am trying to locate security logs for all login attempts. I am using macOS Mojave.
Rnlawson90 wrote:
I am trying to locate security logs for all login attempts. I am using macOS Mojave.
From the terminal.app supply your user name in the command line before you copy and paste:
syslog -F raw -k Facility com.apple.system.lastlog | grep <my_username>
cat /var/log/asl.log
for failed attempts, copy and paste:
log show --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog --last 1d
You should use the Console utility in your Utilities’ folder. You will find all logs in these locations:
/Library/Logs
/Home/Library/Logs
Copy and paste these command lines in their entirety,
2nd one did not wrap and is off the visible page, here the day is set to 1d
copy and pasting solves this problem:
syslog -F raw -k Facility com.apple.system.lastlog | grep <my_username>
log show --predicate '(eventMessage CONTAINS "Authentication failed")' --style syslog --last 1d
So I am not entirely sure I am typing the syslog line in correctly but this is what I get when I do type it in:
Rickys-MacBook-Pro:~ rickylawson$ syslog -F raw -k Facility com.apple.system.lastlog | grep RickyLawson
NOTE: Most system logs have moved to a new logging system. See log(1) for more information.
Rickys-MacBook-Pro:~ rickylawson$ cat /var/log/asl.log
cat: /var/log/asl.log: No such file or directory
Thank you....that worked for the most part.....I locked my computer screen and intentionally used an incorrect password to unlock and reran the commands and this is all I get:
2019-04-02 12:13:29.211068-0400 localhost opendirectoryd[88]: (PlistFile) [com.apple.opendirectoryd:auth] Authentication failed for <private> with ODErrorCredentialsInvalid
over and over
I have attempted to look through these logs and as of yet I am unable to identify the correct log. Thank you for the response.
Where can I find failed login attempts using macOS mojave?