Viewing Logs
Analyzing Different Log Files And Knowing Their Importance
- While on the terminal shell within the Ubuntu system, type the command below to view the content of the auth.log file and press Enter. This file logs system authorization information.
root@Ubuntu:/home/student# cat /var/log/auth.log | less
- Press q to exit.
- While on the terminal shell within the Ubuntu system, type the command below to view the content of the auth.log file and press Enter to find flag6.
root@Ubuntu:/home/student# grep -i "flag6" /var/log/auth*
NOTE: The output of this command may vary slightly depending on which log the answer is in.
- Type the command below to view the content of the last.log file and press Enter. This file logs recent login information.
root@Ubuntu:/home/student# lastlog
- Type the command below to view the content of the btmp log file and press Enter. This file logs failed login attempts.
root@Ubuntu:/home/student#last –f /var/log/btmp | more
- Type the command below to view the content of the wtmp log file and press Enter. This file logs login records to view who is currently connected to the system.
root@Ubuntu:/home/student#last –f /var/log/wtmp | more
Comments
Post a Comment