Obscure Ubuntu Tip: CRON User account has expired
No, I haven't forgotten that I have a blog. I've just been keeping busy with a lot going on at work, and a backlog of “projects” at home after finishing up the kitchen project. Some of those projects have involved getting down-and-dirty with Ubuntu, and I thought I would share a quick tip I discovered yesterday.
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!
16 comments:
Thanks! That fixed the problem with my cron jobs not running!
This really helped me out. Thanks.
Well, how do you say this? It saved my day, I guess... I was really pulling my hair on that one!!!
Thx 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
Thanks. Your post saved me. I wasn't finding much help in the ubuntu forums.
Thankyou, very useful tip! Problem solved :o)
I had exactly this problem. Thanks for solving it for me.
Thank you very much, I used the "passwd -l" command in a hurry and was wondering why my cron jobs did not run...
Awesome thank you very much, you fixed my problem!!
Thank you!
Very nice! Thanks a lot.
Thanks 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.
Thanks! Fixed my problem!
Great solution, thank you!
7 years later, this tip still helps :) thanks.
8 years later, this tip still helps :) Thanks a lot!
Post a Comment