Errors on yum.cron.hourly.conf in new Centos install

Clyde asked:

I have a VPS with a fresh Centos 7 install, and am getting mail from Cron with these errors:

ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /etc/yum/yum-cron-hourly.conf, line: 1
'update_cmd = security\n'

The yum-cron-hourly.conf file looks like this:


update_cmd = security
update_messages = no
download_updates = no
apply_updates = no
random_sleep = 30
[emitters]
system_name = None
emit_via = stdio
output_width = 80
[email]
email_from = [email protected]
email_to = root
email_host = localhost
[groups]
group_list = None
group_package_types = mandatory, default
[base]
debuglevel = -3
mdpolicy = group:main

So it seems yum-cron expects a section header at the start of the file. I have not touched this file – it is exactly as it was (I did not explicitly install yum-cron.)

Any ideas? Can I just add a header? Should I just disable yum-cron?

My answer:


Look at the same file on another unmodified CentOS 7 system. You will find that the missing section header is [commands].

You should also look into what (or more likely who) possibly modified the file.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.