I have a super simple system crontab to run as a specific user. For a user that can login to a Gnome session it works fine. For another user that I use just for system tasks, it will not run.
This is a CentOS 7 box that shows
systemctl status crond as running.
To debug the situation I have reduced the file
SHELL=/bin/bash * * * * * etluser /bin/echo "-- trying" >> /tmp/auto_services.txt
With the user etluser nothing runs. The tmp file does not appear. There is no output in
journalctl -xe, no
/var/log/cron entry and no email to root.
$ getent group etluser etluser:x:499:otheruser $ getent passwd etluser etluser:x:600:499::/home/etluser:/bin/bash $ getent shadow etluser:$6$mw...../:18429:0:90:7:::
/etc/cron.deny is empty and
/etc/cron.allow is not present.
If I change the user in the cron.d file to my standard login user otheruser then the job runs fine.
SHELL=/bin/bash * * * * * otheruser /bin/echo "-- trying" >> /tmp/auto_services.txt
account include system-auth session required pam_loginuid.so session include system-auth auth include system-auth
Any idea what I'm missing?