My system is centos 7.4.
After crontab -e
,I add
MAILTO=root
30 4 * * * root /usr/sbin/aide --check
Then I receive email as below:
From: "(Cron Daemon)" <root@mail.mydomain.com>
To: root@mail.mydomain.com
Subject: Cron <root@myserver> root /usr/sbin/aide --check
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=37>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20190300432001.5EC7524C51@mail.mydomain.com>
Date: Fri, 1 Mar 2019 04:32:01
/bin/sh: root: command not found
I checked /var/log/aide/aide.log
is empty, there's no any information in messages
and secure
.It seemed my crontab script is somewhere wrong.
I just want to receive aide --check
report,where is the problem?