Despite there being closed bugs about this in docker's bug tracker (https://github.com/docker/docker/issues/5663) it remains a problem to use ssh and cron in docker containers, because pam_loginuid.so fails to work inside docker in the default configuration. Workaround is to make the /etc/pam.d/ lines for pam_loginuid.so s/required/optional/. I think this workaround is being applied to some of the standard docker containers (perhaps inconsistently based on other reports like https://github.com/docker/docker/pull/7873). Which leaves it as a land-mine for anyone who builds their own custom containers using Debian. I don't think that Debian should need to be tweaked to be used in a docker container, so I hope this can be really fixed somehow.