network manager has gone crazy

Zind wzmindlog at gmail.com
Tue Nov 13 05:59:03 UTC 2012


On Mon, Nov 12, 2012 at 11:43:54AM +0000, Tony Molloy wrote:
> On Saturday 10 November 2012 16:05:49 lee wrote:
> 
> A kludge to fix this is to make resolv.conf immutable. Then 
> NetworkManager or nothing else can interfere with it.
> 
> Set up /etc/resolv.conf as you want it.
> 
> Then as root:
>      chattr -i /etc/resolv.conf
> 
> Now nothing can change /etc/resolv.conf
> 
> If you need to edit it later then as root:
>      chattr +i /etc/resolv.conf
> 
> A kludge but it works ;-)
> 

Well, are you sure?
$man chattr
A file with the `i' attribute cannot be modified: it cannot be deleted
or renamed, no link can be created to this file and no data can be
written to the file. Only the superuser or a process possessing the
CAP_LINUX_IMMUTABLE capability can set or clear this attribute.

So,
chattr +i /etc/resolv.conf, set /etc/resolv.conf immutable
chattr -i /etc/resolv.conf, set /etc/resolv.conf mutable


More information about the users mailing list