鉴定令牌不再有效,需要新的鉴定令牌 解决 [ User account has expired You (sumitgoel)are not allowed to ac ]

Cron is a daemon in Linux that executes scheduledcommands. Cron looks for /var/spool/cron directory for crontab files which arenamed after user accounts in /etc/passwd file and then found crontabs are loadedinto the memory. Cron also searches for /etc/crontab file and the files in the /etc/cron.d directory. On Red Hat systems, crond supports access control with PAM (PluggableAuthentication Modules). A PAM configuration file for crond is installed in /etc/pam.d/crond. Crond loads the PAM environment from the pam_env module, but these can be overridden by settings inthe crontab file.

Today mysystem user account threw below error while listing the crontab,

[root@server01 ~]#crontab -l -u sumitgoel

User account has expired
You (sumitgoel)are not allowed to access to (crontab) because of pam configuration.
[root@server01 ~]#su - sumitgoel
sumitgoel@server01~ $ crontab -l

User account has expired
You (sumitgoel)are not allowed to access to (crontab) because of pam configuration.
sumitgoel@server01~ $


So the first thing to check here is the user account password expiry informationand chage is a nice command to show the accountaging information,

# chage -l<username>

Most likely the user account password has expired and now we just need to resetthe password of the user account to fix the issue. If this is your serviceaccount and the password is used at countless places where you just cannotchange the password on the fly then simply disable the password expiration forthe account,

# chage -I -1 -m 0-M 99999 -E -1 <username>

You should be all good now but several other things can be checked if you havethis issue,

  • Make sure crond is running using command: /etc/init.d/crond status
  • Check logs for any errors in /var/log/cron and /var/log/messages files.
  • Make sure the user is not listed in /etc/cron.deny file.
  • If /etc/cron.allow file exists, then username must be listed in there to allow the use of cron jobs.

Any feedbackwill be highly appreciated.

Suggested Posts,


This post appeared on the softlexicon.combySumit Goel.Copyright © 2012–2013 –softlexicon.comand Sumit Goel.All rights reserved. Not to be reproduced for commercial purposes withoutwritten permission.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值