We observed new issue related to “Cron Job” on Rocky Linux 9.5 system.
This issue is an blocker for an our release. So, request for an solution as soon as possible. Can someone provide a solution.
Please find details below,
Issue Description : In Our setup we have automatic function in there we have cron job entries. There we have scheduled it, need to load every day “01:00AM”. But its not loading as scheduled time. The cron job is not getting triggered, facing issue on here.
Please find the details of crontab below,
In Cron Log showing error message as,
Jun 25 01:00:01 test crond[6337]: (root) PAM ERROR (Authentication token is no longer valid; new one required)
Jun 25 01:00:01 test crond[6336]: (root) PAM ERROR (Authentication token is no longer valid; new one required)
Jun 25 01:00:01 test crond[6336]: (root) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
Jun 25 01:00:01 test crond[6337]: (root) FAILED to authorize user with PAM (Authentication token is no longer valid; new one required)
This tells me that your root password is expired. Run chage as root. Does it say password must be changed? If so, then you must set a password. Otherwise, chage --maxdays 99999 root will remove the restriction. Below are the defaults.
[root@sani ~]# chage -l root
Last password change : Nov 08, 2024
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
Hi all, I am also experiencing this issue today.
I have cronjobs that run as the admin user and would like them to continue to run regardless of the password being expired.
I need the password to expire every 90days.
The password being re-set will only happend when someone tries to next login to the server, so it can remain expired for weeks.
Looking at this article(Sadly I can’t find one for RHEL9) I’ve tried the fix but it does nto seem to work in Rocky9.
For those who can’t read the article, it’s suggesting:
Modify the /etc/pam.d/system-auth account section like following:
Do you mean root by ‘the admin user’? If the cronjob is run for a user different than root seems like you have to remove the option use_uid, because it makes the module evaluate the validity of root’s passwd:
use_uid
Evaluate conditions using the account of the user whose UID the application is running under instead of the user being authenticated.
Hi,
Yes, After resetting the root password in our setup. The automatic function cron job entries are loading as scheduled time ( 01:00AM ). The cron job is getting triggered.
But facing one more issue on here., As mentioned above log,
During Cron job triggered GetLongBuff.pl will load the getlongbuff.log file in /var/log folder like "/var/log/getlongbuff.log ". But here its showing as “/dev/null”. In code the condition is, if any error occurred during the cron job automatic function then in log need to show as “/dev/null” . So, its showing as /dev/null. But in same code build in different server its working as expected.
After comparing both the servers found that the crontabs rpm is having difference ( Working server shows : crontabs-1.11-27.20190603git.el9_0.noarch and Issue server shows : crontabs-1.11-27.20190603git.el9.noarch ). So, It may causing an issue or anything need to verify.
Request for an solution, Can someone provide a solution for this as soon as possible.
Thanks.