如何让 rkhunter 跳过“[按接着说]”

如何让 rkhunter 跳过“[按接着说]”

每次我rkhunter使用以下命令扫描我的机器时:

sudo rkhunter --checkall

完成某种类型的检查后,它会问我:

[Press <ENTER> to continue]

这变得相当烦人,我总是忘记我已经运行过它,所以几个小时后我才意识到它一直处于这个提示上。当它进行扫描时,我必须一直坐在那里盯着它,这样我才能按下允许ENTER它继续,这也相当烦人。

所以这确实是我的疑问,有什么方法可以让它不提示我按下ENTER而是继续扫描,这样我所要做的就是通过执行初始命令来运行它,然后稍后再回来检查结果?


操作系统信息:

Description:    Ubuntu 14.10
Release:    14.10

封装信息:

rkhunter:
  Installed: 1.4.0-3
  Candidate: 1.4.0-3
  Version table:
 *** 1.4.0-3 0
        500 http://gb.archive.ubuntu.com/ubuntu/ utopic/universe amd64 Packages
        100 /var/lib/dpkg/status

答案1

man rkhunter

--sk, --skip-keypress
      When the --check command option is used, after certain  sections
      of  tests,  the user will be prompted to press the return key in
      order to  continue.  This  option  disables  that  feature,  and
      rkhunter will run until all the tests have completed.
      If  this  option has not been given, and the user is prompted to
      press the return key, a  single  's'  character,  in  upper-  or
      lowercase,  may  be  given  followed by the return key. rkhunter
      will then continue the tests without prompting  the  user  again
      (as if this option had been given).

答案2

这对我有用

echo | sudo rkhunter --checkall

答案3

如果你使用rkhunterwith cronjob,你可以使用脚本

/usr/bin/rkhunter -c -sk

我在我的 Centos 7 上进行了测试。

相关内容