Skip to content

Sudo logging should also check the sudoers.d directory #27

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

Open
nathanielcutajar opened this issue Apr 22, 2025 · 0 comments
Open

Sudo logging should also check the sudoers.d directory #27

nathanielcutajar opened this issue Apr 22, 2025 · 0 comments

Comments

@nathanielcutajar
Copy link

Currently the script only checks the sudoers file but in the file itself it states:

Please consider adding local content in /etc/sudoers.d/ instead of

directly modifying this file.

This means that we should instead create our our separate file with the following:
sudo nano /etc/sudoers.d/logging
Inside the file you'd write:
Defaults logfile=/var/log/sudo.log
Defaults log_input, log_output
sudo chmod 440 /etc/sudoers.d/logging

The script should check the sudoers.d directory and if need be go through all files in there and search for 'Defaults logfile'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant