Hi,

when looking into this bug I noticed you mention a bogus test:

permitrootlogin=`cat ${I}/sshd_config | grep "PermitRootLogin" | grep -v "#"`

Try the following:
% grep "PermitRootLogin" | grep -v '#' <<EOF
PermitRootLogin no 
# PermitRootLogin yes
PermitRootLogin yes # Allow root to login remotely
EOF
PermitRootLogin no
% 

IIRC sshd uses the last occurrence of an option if it is given
multiple times.

I'd suggest you change your test to
% (cut -d'#' -f 1 | grep PermitRootLogin) <<EOF 
PermitRootLogin no
# PermitRootLogin yes
PermitRootLogin yes # Allow root to login remotely
EOF
PermitRootLogin no
PermitRootLogin yes 
% 

Thanks
  Siggy

ps: I didn't read rkhunter code, judging only from your sample.
-- 
               bsb-at-psycho-dot-informationsanarchistik-dot-de
               or:                bsb-at-psycho-dot-i21k-dot-de
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

Attachment: signature.asc
Description: Digital signature

Reply via email to