Question

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

  • Posted October 9, 2014

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?

Subscribe
Share

same here, a little odd. Could do with correcting Digital Ocean?


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

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.

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.

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.

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.

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.

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.

Hi, I am having trouble with this problem. It doesn’t seem that my /etc/hosts file is working. I tried the above instructions with no changes. Can anyone offer any other instruction? Appreciate the help.