3

I stumbled upon Lynis - a security auditing tool for linux - and ran it on my Raspberry Pi to see if I could harden it a bit more. I got one warning in the Authentication group that confuses me.

  - sudoers file                                              [ FOUND ]
    - Permissions for directory: /etc/sudoers.d               [ WARNING ]
    - Permissions for: /etc/sudoers                           [ OK ]
    - Permissions for: /etc/sudoers.d/010_pi-nopasswd         [ OK ]
    - Permissions for: /etc/sudoers.d/010_at-export           [ OK ]
    - Permissions for: /etc/sudoers.d/README                  [ OK ]
    - Permissions for: /etc/sudoers.d/pihole                  [ OK ]

However further down in the Result section it says:

-[ Lynis 2.7.5 Results ]-

  Great, no warnings

  Suggestions (5):
  ----------------------------
[...]

Also none of the Suggestions are referring to this Warning.

These are the permissions for the mentioned directory:

$ ls -l /etc/ | grep sudo
-r--r----- 1 root   root     669 Nov 13  2018 sudoers
drwxr-xr-x 2 root   root    4096 Dec 28  2018 sudoers.d/

Does anyone know why I get this warning and where I might find more detailed information?

5

Lynis expects /etc/sudoers.d to be unreadable by “others”, i.e. rwx[r-][w-][x-]---. If you run

chmod 750 /etc/suders.d

the warning will disappear.

The information should have been logged in the Lynis log file...

  • Thank you, I only looked in the report file and couldn't find it there, but I found it now in the log file :) – lipflip Dec 5 '19 at 17:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.