You are not logged in.
Before switching to systemd, I had crond from cronie configured not to try to use sendmail but to use syslog instead. Since switching to systemd, crond insists on looking for sendmail and fills the logs with errors. After updating the system today, I even got a message prior to login telling me that there was no mail!
[EDIT: I guess the new message is unrelated to this problem and is due to the fact that the pam config for kde is now using redhat's system-login set up. There's a bug for this but I've just commented out the most offending lines for now.]
$ less /etc/systemd/system/cronie.service
[Unit]
Description=Periodic Command Scheduler
[Service]
EnvironmentFile=-/etc/conf.d/crond
ExecStart=/usr/sbin/crond -n $CRONDARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.target$ less /etc/conf.d/crond
# Settings for the CRON daemon.
# CRONDARGS= : any extra command-line startup arguments for crond
CRONDARGS="-s"And, indeed, a check with ps reveals:
/usr/sbin/crond -n -sso the config is getting picked up correctly.
Checking the man page for crond:
-s This option will direct Cron to send the job output to the system log using syslog(3). This is useful if your system
does not have sendmail(8), installed or if mail is disabled.so this is also the correct option to be passing. (Note: this may differ on your system - I believe it depends on which version of cron you have installed.)
For good measure, I also appear to have:
$ less /etc/systemd/system/crond.service
[Unit]
Description=Periodic Command Scheduler
[Service]
EnvironmentFile=-/etc/conf.d/crond
ExecStart=/usr/sbin/crond -n $CRONDARGS
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
[Install]
WantedBy=multi-user.targetsystemctl confirms the argument is being passed:
$ systemctl status cronie.service
cronie.service - Periodic Command Scheduler
Loaded: loaded (/etc/systemd/system/cronie.service; enabled)
Active: active (running) since Mon, 15 Oct 2012 23:30:18 +0100; 1h 51min ago
Main PID: 423 (crond)
CGroup: name=systemd:/system/cronie.service
└ 423 /usr/sbin/crond -n -sDoes anybody know why crond still looks for sendmail and/or how to stop it doing so?
Last edited by cfr (2012-10-18 23:41:55)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
I think because whether or not you choose to have it forwarded to syslog has nothing to do with whether or not it is going to sendmail that sh*t. So I think what you need to do is add "-m off" to either the $CRONDARGS or simply to the command itself, since you have already copied it to /etc.
Offline
Trying that now. (I can't believe I missed this in the man page although the description of the -s option does rather suggest you've got the right flag once you've found that one. Plus it worked pre-systemd!)
Thanks!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Did you get this working how you would like it?
Offline
I'm still testing. (I forgot to reload the service.)
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Ha, I do crap like that all the time. I look at the relevent info and I go "Why the hell is this not working!?!? Oh, I forgot to do a daemon-reload..." Then I feel silly.
Offline
That did the trick - thanks!
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline
Glad to hear it.
Offline