我正在尝试运行一个crontab,它执行一个bash脚本,它触发邮件命令。我只为我的用户在crontab中做了一个条目。同时,执行ps、ax、grep、cron只会导致一个crond进程。我不知道为什么我要收到两次邮件
Cron原木
Aug 7 14:38:10 centos crond[29299]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 85% if used.)
Aug 7 14:38:11 centos crond[29299]: (CRON) INFO (running with inotify support)
当我去/var/log/packages/时,我可以看到我已经安装了dcron-4.5-x86_64-5,我相信这和crond是一样的。现在,我希望确保配置了对/etc/crontab的权限(基于我的CIS基准手册),但是当我运行以下命令时:
stat /etc/crontab
上面写着:
stat: cannot stat '/etc/crontab' : No such file or directory.
我在哪里能找到那个crontab文件?我做得对吗?什么样的松驰软件包利用了crond守护进程?
Oracle Linux 5.10
根用户可以访问crontrab,但不能访问任何其他用户。没有/etc/cron.allow,/etc/cron.deny是一个空文件。
使用Oracle用户帐户:
[oracle@dub-ImrORA2 ~]$ crontab -e
Authentication failure
You (oracle) are not allowed to access to (crontab) because of pam configuration.
/etc/pam.d/crond listing:
auth sufficient pam_env.s
平台: Arch Linux Cron: cronie Mail: msmtp
我发现将cron输出发送到Office 365托管的邮箱会产生以下错误,即使通过CLI发送邮件运行良好:
Apr 01 04:41:10 prod crond[306]: msmtp: the server did not accept the mail
Apr 01 04:41:10 prod crond[306]: msmtp: server message: 550 5.7.1 Client does not have permissions to send as this sender
Apr 01 04:
我已经设置了一个bash脚本来标识一个进程,如果进程正在运行或没有相应地运行,那么就回显它。我的剧本:
#!/bin/bash
var1=$(ps -ef | grep -v grep | grep crond)
echo $var1
if [$var1]
then
echo "The Process is Running"
else
echo "The process is not running"
fi
我正在从Var1变量中获得输出,但是在我的“if-条件”时,代码仍然会因为以下错误而中断:
$ ./test.sh
spidmd07 3034 4649
我的cron作业已经停止在我的CentOS 7服务器上工作。服务器正在运行WHM/cPanel。
这似乎是PAM服务的一个问题,因为在/var/log/secure中,当cron作业试图运行时,我可以看到以下错误:
Jun 24 10:45:01 server1 crond[22400]: pam_access(crond:account): auth could not identify password for [root]
Jun 24 10:45:01 server1 crond[22404]: pam_access(crond:account): auth could not ide
默认情况下,Arch Linux没有安装sendmail。因此,我在我的syslog中得到了以下消息:
Sep 15 13:16:01 zorro crond[18497]: mailing cron output for user collectors sh cronjob.sh
Sep 15 13:16:01 zorro crond[18497]: unable to exec /usr/sbin/sendmail: cron output for user collectors sh cronjob.sh to /dev/null
建议如何修复此默认行为,以便发送实际消息?
heirlo
我正试图在码头集装箱上运行cron作业。我有一个正在运行的容器(Fedora 20)。我还在容器中安装了cron包,并显式地运行cron守护进程。我还检查了cron.deny文件,它是空的,在/etc/目录下没有名为cron.allow的文件。
Whenever I tried to set the cronjob by using crontab -e or trying to list the cron job using
crontab -l I am getting following error.
bash-4.2# crontab -l
You (root) are