not allowed to access to crontab because of pam configuration
If you encounter the following error when running crontab:
$ crontab -l
You (zhangsan) are not allowed to access to (crontab) because of pam configuration.
The reason may be that user zhangsan’s password has expired. When trying to log in with a password, you will be prompted to change your password immediately:
$ su - zhangsan
Password:
You are required to change your password immediately (password aged)
Changing password for zhangsan.
(current) UNIX password:
If it happens to be a hadoop cluster, since password-free login is required, the password cannot expire.
You can use the named chage to check the actual situation, for example (please run as root user):
#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
As you can see from the above: the password needs to be changed every 90 days, and an alarm will be issued 7 days before the password expires.
To make the password permanently valid, you can set it like this:
chage -M 99999 zhangsan
Check again:
#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
http://www.bkjia.com/PHPjc/1104552.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/1104552.htmlTechArticlenot allowed to access to crontab because of pam configuration If you run crontab and encounter the following error: $ crontab -l You (zhangsan) are not allowed to access to (crontab) b...