Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: journalct in auth logs linux roadmap #7951

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/data/roadmaps/linux/content/105-server-review/101-auth-logs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Auth Logs

When dealing with a Linux server and its maintenance, one of the most critical components to regularly review is the auth logs. These logs, usually located in /var/log/auth.log (for Debian-based distributions) or /var/log/secure (for Red Hat and CentOS), record all authentication-related events and activities which have occurred on the server. This includes, among others, system logins, password changes, and issued sudo commands.
When dealing with a Linux server and its maintenance, one of the most critical components to regularly review is the auth logs. These logs, usually located in /var/log/auth.log (for Debian-based distributions) or /var/log/secure (for Red Hat and CentOS) for servers using `syslog`, record all authentication-related events and activities which have occurred on the server. This includes, among others, system logins, password changes, and issued sudo commands.

Auth logs are an invaluable tool for monitoring and analyzing the security of your Linux server. They can indicate brute force login attacks, unauthorized access attempts, and any suspicious behavior. Regular analysis of these logs is a fundamental task in ensuring server security and data integrity.

Expand All @@ -10,4 +10,17 @@ Here is an example of how you can use the `tail` command to view the last few en
tail /var/log/auth.log
```

Get yourself familiar with reading and understanding auth logs, as it's one essential way to keep your server secure.
If the server uses `Journal` instead of the default `syslog`, you can utilize the `journalctl` command to gather auth logs.

Here is an example:

```bash
journalctl -u ssh.service
```

Get yourself familiar with reading and understanding auth logs, as it's one essential way to keep your server secure.

Learn more from the following resources:

- [@opensource@joaurnal native protocol](https://systemd.io/JOURNAL_NATIVE_PROTOCOL/)
- [@official@RFC 5424: The Syslog Protocol](https://datatracker.ietf.org/doc/html/rfc5424)
Loading