I was looking through the system log (/var/log/syslog) on one of my servers and I noticed it was full of “CRON[xxxx]: User account has expired” messages. A little searching on the web pointed to the fact that the root account had been locked. While setting up this server, I had followed some instructions I found on the web that required me to unlock the root account, then re-lock it when I was done with the
sudo passwd -l rootcommand. Locking an account this way also causes the password to be expired, one of the results of which is the above mentioned log entries. Most of the solutions I found on the web involved either unlocking the root again and giving it a long, random password, or manually editing the password files. I think I've found the correct way to fix this though, by using the
sudo chage -E-1 rootcommand, which sets the root's password to never expire. (Note that the -1 is negative one, not dash L). After using the above command, the system log showed normal CRON log entries, and the root account remained locked.
I hope someone else will find this information to be of use. That's it for my very obscure Ubuntu tip. Join me again soon for another exciting post. I actually have a good sized list of topics to cover on the blog, so hopefully things will settle down and you will hear more from me soon. Thanks for stopping by!
Thanks! That fixed the problem with my cron jobs not running!
ReplyDeleteThis really helped me out. Thanks.
ReplyDeleteWell, how do you say this? It saved my day, I guess... I was really pulling my hair on that one!!!
ReplyDeleteThx mate.. it really worked out for me. And the lazy Ubuntu forums didn't help me after 20 mins of searching . Cheers, keep up the good work
ReplyDeleteThanks. Your post saved me. I wasn't finding much help in the ubuntu forums.
ReplyDeleteThankyou, very useful tip! Problem solved :o)
ReplyDeleteI had exactly this problem. Thanks for solving it for me.
ReplyDeleteThank you very much, I used the "passwd -l" command in a hurry and was wondering why my cron jobs did not run...
ReplyDeleteAwesome thank you very much, you fixed my problem!!
ReplyDeleteThank you!
ReplyDeleteVery nice! Thanks a lot.
ReplyDeleteThanks for the tip! Because of the expired root password, the cleanup of PHP sessions on Ubuntu located at /var/lib/php5. The rate that these session files were growing was just amazing.
ReplyDeleteThanks! Fixed my problem!
ReplyDeleteGreat solution, thank you!
ReplyDelete7 years later, this tip still helps :) thanks.
ReplyDelete8 years later, this tip still helps :) Thanks a lot!
ReplyDelete