程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> not allowed to access to crontab because of pam configuration

not allowed to access to crontab because of pam configuration

編輯:關於PHP編程

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密碼過期了。當嘗試以密碼登錄時,會報提示需要立即修改密碼:
$ 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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved