[ubuntu-jp:6552] Re: rkhunterの警告について

Mitsuya Shibata mty.shibata @ gmail.com
2023年 1月 18日 (水) 15:41:35 UTC


コヤマさま、

> /etc/ssh/sshd_config では  PermitRootLogin no
> /etc/rkhunter.conf では  ALLOW_SSH_ROOT_USER=no
>
>
> rkhunter --check --rwo  を実施すると
>
> Warning: The SSH and rkhunter configuration options should be the same:
>           SSH configuration option 'PermitRootLogin': no
>           Rkhunter configuration option 'ALLOW_SSH_ROOT_USER': yes
>
> と表示されるのですが、/etc/rkhunter.conf では  ALLOW_SSH_ROOT_USER=no
> を指定しています。


Ubuntu 22.04 LTSのLXDコンテナで試してみましたが、再現できませんでした。

---
$ sudo apt install rkhunter
$ grep "PermitRootLogin" /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
# the setting of "PermitRootLogin without-password".
PermitRootLogin no
$ grep ALLOW_SSH_ROOT /etc/rkhunter.conf
ALLOW_SSH_ROOT_USER=no
$ sudo rkhunter --check --rwo --enable system_configs
$ sudo rkhunter --check --enable system_configs
[ Rootkit Hunter version 1.4.6 ]

Checking the local host...

  Performing system configuration file checks
    Checking for an SSH configuration file                   [ Found ]
    Checking if SSH root access is allowed                   [ Not allowed ]
    Checking if SSH protocol v1 is allowed                   [ Not set ]
    Checking for other suspicious configuration settings     [ None found ]
    Checking for a running system logging daemon             [ Found ]
    Checking for a system logging configuration file         [ Found ]
    Checking if syslog remote logging is allowed             [ Not allowed ]


System checks summary
=====================

File properties checks...
    All checks skipped

Rootkit checks...
    All checks skipped

Applications checks...
    All checks skipped

The system checks took: 1 second

All results have been written to the log file: /var/log/rkhunter.log

No warnings were found while checking the system.
---

ちなみに/etc/ssh/sshd_configのPermitRootLoginをコメントアウトすると、
「デフォルト値がyesかもしれない」みたいな警告は出ますが、コヤマさまのそれとは別のようです。

/var/log/rkhunter.logあたりに何か情報が残っていたりしませんでしょうか。

以上、よろしくお願いいたします。
-- 
Mitsuya Shibata
mty.shibata @ gmail.com


ubuntu-jp メーリングリストの案内