How to stop Network Manager (I asssume) overwriting /etc/hosts in 10.10?

Ray Leventhal ubuntu at swhi.net
Tue Mar 22 19:36:18 UTC 2011


<huge snip>
>> Is it "chris"? Does changing it to "chris.yourdomain" resolve your problem?
>>
> It's the fact that Network Manager insists on adding "127.0.0.1
> localhost.localdomain" that causes me a problem.  Both apache2 and
> leafnode complain when finding that the domain name is localdomain.
>
> I have solved the problem for the moment simply be uninstalling Network
> Manager and installing wicd instead, that leaves everything as I want it
> but gives me a GUI interface to look at things still.
>

Perhaps issuing the command:

sudo chattr +i /etc/hosts

after making your specific edits will keep it from being re/over-written.

Not tested, just a thought.

HTH,
-Ray




More information about the ubuntu-users mailing list