not allowed to access to crontab because of pam configuration

简介: 如果运行crontab如遇下面这样的错误: $ crontab -l You (zhangsan) are not allowed to access to (crontab) because of pam configuration. 原因可能是因为用户zhangsan密码过期了。
如果运行crontab如遇下面这样的错误:
$ crontab -l
You (zhangsan) are not allowed to access to (crontab) because of pam configuration.


原因可能是因为用户zhangsan密码过期了。当尝试以密码登录时,会报提示需要立即修改密码:
$ su - zhangsan
Password: 
You are required to change your password immediately (password aged)
Changing password for zhangsan.
(current) UNIX password: 


如果正好是hadoop集群,由于需要免密码登录,密码不能过期。
可以使用命名chage查看实际情况,比如(请以root用户运行):
#chage -l zhangsan
Last password change                                    : Nov 23, 2015
Password expires                                        : Feb 21, 2016
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 90
Number of days of warning before password expires       : 7


从上可以看到:每90天需要修改一次密码,密码到期前7天会告警。
为了让密码永久有效,可这样设置一下:
chage -M 99999 zhangsan


再次查看:
#chage -l zhangsan
Last password change                                    : Nov 23, 2015
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
相关文章
|
11月前
|
Oracle 关系型数据库 数据安全/隐私保护
you (oracle) are not allowed to access to crontab because of pam configuraion
you (oracle) are not allowed to access to crontab because of pam configuraion
197 0
|
Linux 数据安全/隐私保护
You (root) are not allowed to access to (crontab) because of pam configuration
巡检发现一台Linux服务器上的作业没有如期发送邮件,登录服务器检查后发现作业并没有执行,于是检查一下crontab的设置。结果发现如下错误:   [root@mylnx2 ~]# crontab -l   Authentication token is no longer valid; n...
2978 0
|
9月前
|
Linux 数据安全/隐私保护
13.5.3 【Linux】PAM 模块设置语法
13.5.3 【Linux】PAM 模块设置语法
83 0
|
9月前
|
Shell Linux API
13.5 【Linux】使用者的特殊 shell 与 PAM 模块
13.5 【Linux】使用者的特殊 shell 与 PAM 模块
63 0
|
Linux
Linux使用PAM锁定多次登陆失败的用户
Linux使用PAM锁定多次登陆失败的用户
138 0
|
网络协议 关系型数据库 MySQL