rkhunter の warning を解消する
rkhunter でスキャンをかけると以下のように2つのワーニングが出た。
$ sudo rkhunter --check --skip-keypress --report-warnings-only Warning: The SSH and rkhunter configuration options should be the same: SSH configuration option 'PermitRootLogin': no Rkhunter configuration option 'ALLOW_SSH_ROOT_USER': unset Warning: Suspicious file types found in /dev: /dev/.udev/tmp-rules--70-persistent-net.rules: ASCII English text /dev/.udev/tmp-rules--70-persistent-cd.rules: ASCII English text
これを解決するために、/etc/rkhunter.conf
を編集する。
1番目のワーニングについては、ALLOW_SSH_ROOT_USER=no
と書き換えればよい。
2番目のワーニングは ALLOWDEVFILE=***
を追加することで解消する。
rkhunter.conf
の編集前後での diff を取ると以下のようになる。
@@ -310,7 +310,7 @@ AUTO_X_DETECT=1 # The default value is 'no'. # #ALLOW_SSH_ROOT_USER=no -ALLOW_SSH_ROOT_USER=unset +ALLOW_SSH_ROOT_USER=no # # Set this option to '1' to allow the use of the SSH-1 protocol, but note @@ -758,6 +758,9 @@ ALLOWDEVFILE=/dev/.udev/rules.d/99-root.rules ALLOWDEVFILE="/dev/md/autorebuild.pid" # 389 Directory Server ALLOWDEVFILE=/dev/shm/sem.slapd-*.stats +# added manually +ALLOWDEVFILE="/dev/.udev/tmp-rules--70-persistent-net.rules" +ALLOWDEVFILE="/dev/.udev/tmp-rules--70-persistent-cd.rules"
編集後には以下のコマンドを実行する必要がある。
$ sudo rkhunter --propupd