Question

Why the system Ubuntu 14.04 is configured 'manage_etc_hosts' as True by default?

  • Posted on October 9, 2014
  • JL06Asked by JL06

I had created a droplet before with an image of Ubuntu 14.04 x64 but now that I create one appears this message when I see the file /etc/hosts

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data

I didn’t set any configuration and I checked that in the older droplet that I have those files don’t exists. Does the image changed? is there another change in it?

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

There was recently a change to the way that the initial configuration of new droplets is done. cloud-init is now used to do things like set the hostname and add SSH keys. This is the first step to allowing users to provide first boot configuration details using cloud-config files or scripts via “user-data.”.

After first boot, you should be able to manage /etc/hosts as you would normally. I just tested making direct changes to the file, and it persisted following a reboot. cloud-init itself seems to be creating this misleading warning. I’m going to bring this up with our engineering team to investigate.

Hello All,

In my experience you must either be logged in as ROOT. Login to the console provided by DigitalOcean and you will be allowed to edit all those files with that message.

Not sure why it does this though. I have restricted SSH setup and I am using an added user maybe that is the issue.

I’m glad I found this as well. It would be great to fix this soon.

I was surprised to see this message in /etc/hosts and I didn’t think I could change my hostname until I found this message.