At 10:17pm last night, an Azure web server (Bitnami WordPress stack) started generating one error per minute, each one sending an identical email, 600+ emails by morning.
Email Subject
Cron root@HOSTNAME [ ( ! -f /etc/opt/omi/creds/omi.keytab ) -o ( /etc/krb5.keytab -nt /etc/opt/omi/creds/omi.keytab ) ] && /opt/omi/bin/support/ktstrip /etc/krb5.keytab
Email Body
src kt = /etc/krb5.keytab
File /etc/krb5.keytab does not exist
/opt/omi/bin/support/ktstrip: 38: exit: Illegal number: –1
Cause
The root user’s crontab file (/var/spool/cron/crontabs/root) was changed last night at 10:16:35pm. The following line was added:
* * * * * [ \( ! -f /etc/opt/omi/creds/omi.keytab \) -o \( /etc/krb5.keytab -nt /etc/opt/omi/creds/omi.keytab \) ] && /opt/omi/bin/support/ktstrip /etc/krb5.keytab /etc/opt/omi/creds/omi.keytab
Workaround
Thanks to onedotover’s comment in Omi issue 425 on Github, I learned that I could run the following command to remove the new line from the crontab file:
sudo /opt/omi/bin/support/config_keytab_update.sh --unconfigure
I suggest following that issue for the latest updates.
Solution?
I don’t know why the crontab was changed or by whom. Was this pushed from Azure? What is Omi anyway and why is it on this server?
Update January 26, 2018
According to comments on the Github issue cited above, a patch was pushed two days ago that unwittingly included this bug. They are considering pushing a hotfix ahead of the next full version, but the workaround in the meantime is to run the command shown above.
Had the exact same issue with an Azure VM last night. Very frustrating. Thanks for the info. Running that command did stop the every-minute cron error emails, so now I guess we just wait for them to roll out a fix, per https://github.com/Microsoft/omi/issues/425#issuecomment-360659124
Thanks for the tip. Found 5000 emails this morning. Nothing like an error that kicks off at the start of a long weekend. It’s been a while since a google search returned only two results – one of which was useful. Reminds me of the old Googlewhack days.
don’t know if it’s just me but when you copy/paste that line the –unconfigure comes as _unconfigure, which errors (it actually loops into infinite error)
Juliano, sorry about that. I think I’ve fixed it. Thanks for the report.