You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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 define
the central authentication scheme for use on the system
(e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
traditional Unix authentication mechanisms.
As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
local modules either before or after the default block, and use
pam-auth-update to manage selection of other modules. See
pam-auth-update(8) for details.

希望这个踩坑经验能帮到遇到同样问题的朋友!

备注:内容来源于stack exchange,提问作者anjanesh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 09:09:32