Crontab ERROR: failed to open PAM security
程序员文章站
2022-05-31 20:15:42
...
今天在一台机器上部署定时任务,用root登录机器,创建crontab任务:
crontab -u test -e
以为万事大吉,只等任务自动执行了;后来发现任务没有按照预期执行。
- 检查crond状态正常:/etc/init.d/crond status
- 检查任务运行日志/var/log/cron,发现日志里有错误:
CRON (test) ERROR: failed to open PAM security session: Success CRON (test) ERROR: cannot set security context
- 可能是用户没有设置密码;想起新建用户test后还没有设置密码,设置好密码,任务果然可以正常执行了。
- 如果密码设置完成,任务还不能执行检查/etc/pam.d/crond和/var/log/secure查看权限设置是否正确,具体检查步骤请看这里
转载于:https://my.oschina.net/killnull/blog/711314
推荐阅读
-
Arduino编程ESP8266下载报错错误:warning: espcomm_sync failed error: espcomm_open failed error: espcomm_uplo
-
Warning: file_get_contents(url): failed to open stream: No error in,该怎么解决
-
关于failed to open stream: No error的异常
-
docker 中的 mysql导入sql脚本时错误指令:Failed to open file "file_name" error 2/error 22
-
ubunttu环境下mysql报错 ERROR: Failed to open file ‘‘/home/yby/***.sql‘‘, error: 2
-
Docker MySQL导入.sql文件(官方Sakila示例库),解决Failed to open file xxx.sql, error: 2
-
Mac下php-fpm启动报错 ERROR: failed to open configuration file... ...
-
Crontab ERROR: failed to open PAM security
-
@xgboost Error: Check failed: fin: Failed to open config file: “demo/binary_classification/mushroom.
-
source命令执行sql文件报错Failed to open file 'F:_goods-2.sql', error: 2