Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 7 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.