0

My NetworkManager randomly empties /etc/resolv.conf for no apparent reason. After connecting to a network, the file contains whatever was obtained via DNS. Usually it keeps its contents, but sometimes it randomly empties itself. I notice because I randomly loose Internet connectivity (at least for non-cached websites) and when looking in the file at that time, it's completely empty.

I would use Google's DNS and make the file unreadable (or stop NetworkManager from editing the file at all, I think I saw an option for that) but using a local DNS server is actually useful when you use things like ssh me@myandroid (where myandroid is a local hostname).

It happens on all networks: at home, with my mobile hotspot, in school, etc. It does not happen on a specific moment as far as I can tell. Sometimes I might say it's bad signal causing it somehow, but that does not always seem to be the case. I'm using Debian testing (stretch) with Cinnamon 2.6.13 and NetworkManager 1.0.6.

Why does this happen and how can I fix it?

  • /etc/resolv.conf isn't directly edited by NetworkManager, it is written using resolvconf. You might find further clues on what is happening in /var/run/resolvconv. – alienth Sep 9 '15 at 17:44
  • @alienth There is no resolvconf file or directory in /var/run or /run. The only place locate can find it is in /etc. The only place ls -R /run can find esolv is in /run/rdnssd and that file seems to be an exact copy of /etc/resolv.conf (not a sym- or hardlink, just a copy). Any other place I might look? – Luc Sep 9 '15 at 17:50
  • Related: askubuntu.com/questions/627899/… – Incnis Mrsi Sep 12 '15 at 17:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.