CentOS/CentOS-Dockerfiles

CROND fails to run schedules due to PAM for centos:latest

Opened this issue · 4 comments

In the default setup CROND will not run even with cronie installed and the process is running. This seems to be an issue with PAM. In "/etc/pamd.d/crond" the line "session required pam_loginuid.so" is causing CROND to fail. The only solution that seemed to work was the following:

RUN sed -i '/session required pam_loginuid.so/d' /etc/pamd.d/crond

Once removed or commented out everything CROND worked as expected.

This was on centos:latest

This is more of a distribution/packaging issue than a container issue. I would recommend filing this as an upstream bug at bugzilla.redhat.com.

Ok, the issue only occurs in the container, not when running on a CentOS 7 host. Is that still something that needs to be reported upstream?

Please, because the package contents is the same for the OS and the containers. Since the package isn't in the container by default, there isn't anything we can do short of posting your workaround as a faq.

i modify /etc/pamd.d/crond and it works.

then it does not work now after i upgrade Centos from 7.3 to 7.4