Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I recently upgraded from 11.10 to 12.04, and now NetworkManager isn't populating /etc/resolv.conf when connecting to wireless networks, when it had been working perfectly in 11.10. I'm not seeing any explicit errors in either the NM UI or in syslog. How do I diagnose what's wrong?

Edit: If I try to run resolvconf, I get the error "resolvconf: Error: /etc/resolv.conf isn't a symlink, not doing anything." What should it be a symlink to and/or how do I get NM to populate it? This says the symlink should point to /run/resolvconf/resolv.conf, but that file does not exist on my system.

share|improve this question

3 Answers

up vote 22 down vote accepted

Use following command and answer YES to enable dynamic updates:

sudo dpkg-reconfigure resolvconf

Worked for me on Ubuntu 12.04.

share|improve this answer
Worked perfectly. Have an old laptop with 12.04 a dead battery that I unplugged by accident. Could ping my home router but not get web pages. Oddly could access other wifi network. This gave me access through home network again. – Mark D Sep 18 '12 at 4:06
The question remains: Why was the symlink missing? This question is being addressed in bug #1000244 (bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1000244). See comment #66 for my best guesses about the various causes of this problem. – jdthood Oct 28 '12 at 20:47

If /etc/resolv.conf is a file then move it to /run/resolvconf/resolv.conf :

sudo mv /etc/resolv.conf /run/resolvconf/resolv.conf

Then create the symlink:

sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf
share|improve this answer
This helps. But easier and more reliable (typos) way for doing that is sudo dpkg-reconfigure resolvconf and answer YES. – geekQ Mar 28 at 9:17

I had the same problem. Seems that Ubuntu is using a local resolver now. The fastest way to remove that is to comment out the following line in /etc/NetworkManager/NetworkManager.conf:

#dns=dnsmasq

For more information, please take a look at this page.

share|improve this answer
Disabling that line and then restarting NM has no noticeable effect for me. The error still occurs and NM still refuses to populate resolv.conf. – Cerin May 15 '12 at 22:38

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.