Crontab : how to recover from corrupt internal cron database ?
Each time I try to modify (solaris 10) crontab via crontab -e, I get following message :
"The editor indicates that an error occurred while you were editing the crontab data - usually a minor typing error.
Edit again, to ensure crontab information is intact (y/n)?"
Even if I put "#" in front of every line of the crontab -e, I get the same message.
When I remove all the lines and try to save the empty crontab -e, then I get the message
"crontab: temporary file empty" but when I do crontab -e again, I still get the "old" crontab content as before I emptied it.
I suspect that my internal crondatabase is corrupted by a collegue who did not know what he/she was doing.
How can i recover from this situation ?
PS : here I show you the crontab -e :
#ident "@(#)root 1.21 04/03/23 SMI"
# The root crontab should be used to perform accounting data collection.
10 3 * * * /usr/sbin/logadm
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
#10 3 * * * /usr/lib/krb5/kprop_script ___slave_kdcs___
Try commenting out:
It would be better to get rid of the test there altogether. If it isn't found or executable then it simply won't run. You'll see its failure in your cronlog. That is to say change the line to simply:
Removing that line indeed helped !
I am a bit surprised becasue emptying the file did not help. So, I am surprised that removing this line helps me out.
thanks for your response !
Emptying the file changed your message so it did "help". It was just the fact you got a different message that made it seem not to have helped.
Glad I could help. As noted you don't have to remove the line altoghether - just alter it to remove the shell test syntax it didn't like.
|All times are GMT -5. The time now is 12:22 PM.|