Bug 1871812

Summary: rkhunter does not search files in /etc/ssh/sshd_config.d for local settings
Product: [Fedora] Fedora Reporter: Martin Gregorie <martin>
Component: rkhunterAssignee: Kevin Fenzi <kevin>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 32CC: kevin, manuel.wolfshant, nonamedotc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-08-25 19:40:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Martin Gregorie 2020-08-24 10:54:03 UTC
Description of problem: 

rkhunter does not recognise the PermitRootLogin parameter when it is set in 
/etc/ssh/sshd_config.d/local.conf


Version-Release number of selected component (if applicable):  1.4.6


How reproducible:

Happens with every day's rkhunter scan


Steps to Reproduce:
1. sudo rkhunter --cronjob --nocolors --report-warnings-only


Actual results:   

Warning: The SSH configuration option 'PermitRootLogin' has not been set.
         The default value may be 'yes', to allow root access.


Expected results: No warnings reported


Additional info:


Here is the output of a grep run showing that PermitRootLogin is set in 
/etc/ssh/sshd_config.d/local.conf and not in /etc/ssh/sshd_config

$ sudo grep PermitRootLogin /etc/ssh/sshd_config \
> /etc/ssh/sshd_config.d/local.conf
/etc/ssh/sshd_config:#PermitRootLogin prohibit-password
/etc/ssh/sshd_config:# the setting of "PermitRootLogin without-password".
/etc/ssh/sshd_config.d/local.conf:PermitRootLogin yes

Comment 1 Kevin Fenzi 2020-08-25 19:40:07 UTC

*** This bug has been marked as a duplicate of bug 1851620 ***