You (root) are not allowed to access to (crontab) because of pam configuration
2017-07-05 11:07
615 查看
巡检发现一台Linux服务器上的作业没有如期发送邮件,登录服务器检查后发现作业并没有执行,于是检查一下crontab的设置。结果发现如下错误:
[root@mylnx2 ~]# crontab -l
Authentication token is no longer valid; new one required
You (root) are not allowed to access to (crontab) because of pam configuration.
[root@mylnx2 ~]#
查看了一下/etc/pam.d/crond,仔细检查后发现我们设置了密码过期策略,当密码过期后,作业由于权限认证是不会执行的,这个可以参考Linux账号密码过期会导致crontab作业不能执行和 Linux账户密码过期安全策略设置
[root@mylnx2 ~]# more /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 include password-auth
session required pam_loginuid.so
session include password-auth
auth include password-auth
想必细心的人发现上面截图里面都是root账号, 那如果密码过期了后,你怎么使用root登录呢? 其实这里我们访问服务器通过Jump Server(跳板机)登录,登录后使用sudo su - 切换到root账号,所以没有遇到类似下面需要修改密码的通知。
You are required to change your password immediately (password aged)
Last login: Wed Jun 28 15:42:13 2017 from xxx.xxx.xxx.xxx
Changing password for root.
(current) UNIX password:
[root@mylnx2 ~]# crontab -l
Authentication token is no longer valid; new one required
You (root) are not allowed to access to (crontab) because of pam configuration.
[root@mylnx2 ~]#
查看了一下/etc/pam.d/crond,仔细检查后发现我们设置了密码过期策略,当密码过期后,作业由于权限认证是不会执行的,这个可以参考Linux账号密码过期会导致crontab作业不能执行和 Linux账户密码过期安全策略设置
[root@mylnx2 ~]# more /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 include password-auth
session required pam_loginuid.so
session include password-auth
auth include password-auth
想必细心的人发现上面截图里面都是root账号, 那如果密码过期了后,你怎么使用root登录呢? 其实这里我们访问服务器通过Jump Server(跳板机)登录,登录后使用sudo su - 切换到root账号,所以没有遇到类似下面需要修改密码的通知。
You are required to change your password immediately (password aged)
Last login: Wed Jun 28 15:42:13 2017 from xxx.xxx.xxx.xxx
Changing password for root.
(current) UNIX password:
相关文章推荐
- Permission denied You (root) are not allowed to access to (crontab) because of pam configuration.
- You (用户名) are not allowed to access to (crontab) because of pam configuration问题处理
- You (root) are not allowed to access to (crontab)
- not allowed to access to crontab because of pam configuration
- yii-You are not allowed to access this page
- yii-You are not allowed to access this page
- Yii-You are not allowed to access this page
- Yii: gii 403 Error you are not allowed to access this page
- yii-You are not allowed to access this page
- 【问题解决】YII2 Forbidden (#403) You are not allowed to access this page
- yii gii You are not allowed to access this page.
- 使用FABridge时,出现You are trying to call recursively into the Flash Player which is not allowed…错误的处理
- Host is not allowed to connect to this MySQL server 和 access denied for user 'root'@'localhost' 解决办法
- 鉴定令牌不再有效,需要新的鉴定令牌 解决 [ User account has expired You (sumitgoel)are not allowed to ac ]
- CodeIgniter文件上传时提示The filetype you are attempting to upload is not allowed
- CodeIgniter “The filetype you are attempting to upload is not allowed.”解决
- 提交项目到AppStore签名授权问题“You are not allowed to perform this operation”
- git push 出现 you are not allowed to upload merges 错误提示
- Not allowed to access triangles on mesh 'Combined Mesh (root: scene)
- you are not allowed to push code to protected branches on this project