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
-- 
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org

Reply via email to