1

I configured NetworkManager, so that it maintains symbolic link from /etc/resolv.conf to file in its directory - /var/run/NetworkManager/resolv.conf

ls -l /etc/resolv.conf
... /etc/resolv.conf -> /var/run/NetworkManager/resolv.conf

Resolvconf gives on attemp to configure DNS:

resolvconf -u
/etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

It contradicts with NetworkManager's settings. How to get rid of this warning and set up both NetworkManager and resolvconf without conflict?

4

First of all that is a WARNING.
Here is the approach for your question from the resolvconf man page:

Normally  the  resolvconf  program is run only by network interface configuration programs
such as ifup(8),  ifdown,  NetworkManager(8),  dhclient(8),  and  pppd(8);  and  by  local
nameservers  such  as  dnsmasq(8).  These programs obtain nameserver information from some
source and push it to resolvconf.
...
To  make  the  resolver  use  this  dynamically  generated resolver configuration file the
administrator   should   ensure   that   /etc/resolv.conf   is   a   symbolic   link    to
/run/resolvconf/resolv.conf.   This  link  is  normally  created  on  installation  of the
resolvconf package.  The link is never modified by the resolvconf program itself.  If  you
find  that  /etc/resolv.conf is not being updated, please check to make sure that the link
is intact.

So what you need to do in order to get rid of the WARNING is to recreate the symbolik link you have 2 options:

  1. Either you recreate the symlink acording to man page with

    rm -f /etc/resolv.conf # Delete actual file/symlink 
    ln -s /run/resolvconf/resolv.conf /etc/resolv.conf # recreate the symlink
    

    You need to point to the correct file: /run/resolvconf/resolv.conf, not to /var/run/NetworkManager/resolv.conf.

  2. Tell resolvconf not to show you WARNING using REPORT_ABSENT_SYMLINK option:

    echo 'REPORT_ABSENT_SYMLINK="no"' >> /etc/default/resolvconf
    
  • 1
    You welcome @Bulat M. – Stancu Mihai Jan 18 '17 at 8:55
  • I'm on ubuntu 16.04- /etc/default/resolvconf does not exist so create it by nano /etc/default.resolvconf – Jadeye Oct 20 '18 at 14:16

Your Answer

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

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