[Docker] The crontab is not work in docker

Source: docker容器内cron不执行

vim /etc/pam.d/crond

#

The PAM configuration file for the cron daemon

#
#

No PAM authentication called, auth modules not needed

account required pam_access.so

account sufficient pam_access.so
account include password-auth

session required pam_loginuid.so

session sufficient pam_loginuid.so
session include password-auth
auth include password-auth

required: failure of such a PAM will ultimately lead to the PAM-API returning failure but only after the remaining stacked modules (for this service and type) have been invoked.

sufficient: if such a module succeeds and no prior required module has failed the PAM framework returns success to the application or to the superior PAM stack immediately without calling any further modules in the stack. A failure of a sufficient module is ignored and processing of the PAM module stack continues unaffected.

4.1. Configuration file syntax

This entry was posted in Docker, Linux. Bookmark the permalink.