Ubuntu 20.04服务器Cron任务无法执行的问题咨询
Ubuntu 20.04服务器Cron任务无法执行的问题咨询
我最近在Ubuntu 20.04服务器上碰到个头疼的问题:设置好的Cron任务一直不执行。试了各种排查方法后,才发现是/etc/pam.d/common-auth文件里的几行配置被注释掉了,取消注释后问题就解决了!
需要取消注释的内容如下:
auth [success=1 default=ignore] pam_unix.so nullok auth requisite pam_deny.so auth required pam_permit.so auth optional pam_cap.so
顺带贴一下这个文件的官方说明,方便大家理解配置的作用:
This file is included from other service-specific PAM config files,and should contain a list of the authentication modules that definethe central authentication scheme for use on the system(e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use thetraditional Unix authentication mechanisms.As of pam 1.0.1-6, this file is managed by pam-auth-update by default.To take advantage of this, it is recommended that you configure anylocal modules either before or after the default block, and usepam-auth-update to manage selection of other modules. Seepam-auth-update(8) for details.
希望这个踩坑经验能帮到遇到同样问题的朋友!
备注:内容来源于stack exchange,提问作者anjanesh
相关产品推荐
相关产品推荐

