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

Ray Leventhal ubuntu at swhi.net
Wed Mar 23 13:58:33 UTC 2011


On 03/22/2011 04:34 PM, Chris G wrote:


<snip>
 > On Tue, Mar 22, 2011 at 03:36:18PM -0400, Ray Leventhal wrote:
>>>
>>
>> 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.
>>
> I had tried setting /etc/hosts read-only (chmod 0444) and that didn't
> work, I'm not sure if the above would work better.
>

Hi Chris,

I did test the immutable flag (+i) and it seems to keep anything from 
writing to the file on which it is set.  This may well fix your problem.

HTH,
-Ray

-- 
       \\!//
       (o o)
--oOOo-(_)-oOOo--




More information about the ubuntu-users mailing list