OK, I've found the problem. 

Strange side observation: My power cable was loose, and when pulling the
network cable to ensure there's no DHCP response, I accidently pulled
the power cable as well, thus forcing the machine into a hard immediate
shutdown.

After booting from that hard shutdown, the machine had the new hostname,
but after booting again, the machine came up with it's old hostname.

reason:

The ubuntu server installation image (which I used to install that
machine) contains cloud-init.

There's several configuration files in /var/lib/cloud/instance, e.g.
user-data.txt cloud-config.txt obj.pkl. Some of them fresh, obviously
modified or recreated today. Removing them solves the problem.


So the reason of the problem is: Although it's not a cloud machine, but
a physical machine, ubuntu installs that cloud stuff. That cloud stuff
should configure the machine exactly once, but keeps reconfiguring the
machine at every boot time, resetting the machine to those settings
entered at installation time.

which probably means, and that's a security problem, that it resets the
admins user account and password to the settings at installation time.
If the admin changes the password (e.g. because compromised), it would
probably happen that the machine resets to the old password in the same
way it sets the old hostname.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1780867

Title:
  hostname unchangeable / some daemon changes and resets  /etc/hostname

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/1780867/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to