4

What should I do to make /etc/resolv.conf only editable by root? I don't want anything to edit it after I specify my own DNS servers, i.e. only editable by the user with root privileges.

Oxwivi
  • 17,849

1 Answers1

7

It is already so.

If you mean you want NetworkManager do not overwrite resolv.conf you should consider declaring your nameservers in NetworkManager, rather than writing them in resolv.conf.

To this aim, it is enough to go to IPv4 page of the connection and set the method to "Automatic (DHCP) address only", or "Manual" if you want to set also a static IP address.

enzotib
  • 93,831