Remove search entry from resolv.conf in Ubuntu 17.10

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












My /etc/resolv.conf (and also /run/systemd/resolve/resolv.conf) contain a search entry for wifi.ns.nl that I did not put there and do not want there. It seems related to a problem I have now in that I cannot resolve some web addresses. The resolv.conf files are managed by systemd-resolved and tell me not to edit them manually. If I do that anyway nothing changes and if I restart sytsemd-resolvd it changes the resolv.conf files back to their original state.



The search wifi.ns.nl line probably appeared after I tried to connect to a captive wifi network run by ns.nl. After connecting to the wifi, but before accepting the terms on the web portal, I tried to connect with SSH to a server. That didn't work, and accessing any other website through the wifi also did not work. When I came home and connected to my home network, connecting to the server I wanted to connect to still didn't work, and systemd-resolve now says resolve call failed: No appropriate name servers or networks for name found for that server and for *.wifi.ns.nl. (I can still connect to the server using the ip address, and I can resolve the name using dig on a remote dns server, so the problem is only my local DNS resolver.)



If I do systemd-resolve --status it also tells me 'wifi.ns.nl' is one of my global DNS Domains.



Apparently something somewhere has remembered some setting probably related to the captive wifi network and wifi.ns.nl. I've tried restarting systemd-resolved, networking, network-manager, but the search entry is still there.



(I also did a sudo grep -R wifi.ns.nl /etc, it doesn't find 'wifi.ns.nl' anywhere else under /etc other than the resolv.conf file)



How can I remove that search entry, other than rebooting my system?










share|improve this question

























    up vote
    0
    down vote

    favorite












    My /etc/resolv.conf (and also /run/systemd/resolve/resolv.conf) contain a search entry for wifi.ns.nl that I did not put there and do not want there. It seems related to a problem I have now in that I cannot resolve some web addresses. The resolv.conf files are managed by systemd-resolved and tell me not to edit them manually. If I do that anyway nothing changes and if I restart sytsemd-resolvd it changes the resolv.conf files back to their original state.



    The search wifi.ns.nl line probably appeared after I tried to connect to a captive wifi network run by ns.nl. After connecting to the wifi, but before accepting the terms on the web portal, I tried to connect with SSH to a server. That didn't work, and accessing any other website through the wifi also did not work. When I came home and connected to my home network, connecting to the server I wanted to connect to still didn't work, and systemd-resolve now says resolve call failed: No appropriate name servers or networks for name found for that server and for *.wifi.ns.nl. (I can still connect to the server using the ip address, and I can resolve the name using dig on a remote dns server, so the problem is only my local DNS resolver.)



    If I do systemd-resolve --status it also tells me 'wifi.ns.nl' is one of my global DNS Domains.



    Apparently something somewhere has remembered some setting probably related to the captive wifi network and wifi.ns.nl. I've tried restarting systemd-resolved, networking, network-manager, but the search entry is still there.



    (I also did a sudo grep -R wifi.ns.nl /etc, it doesn't find 'wifi.ns.nl' anywhere else under /etc other than the resolv.conf file)



    How can I remove that search entry, other than rebooting my system?










    share|improve this question























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      My /etc/resolv.conf (and also /run/systemd/resolve/resolv.conf) contain a search entry for wifi.ns.nl that I did not put there and do not want there. It seems related to a problem I have now in that I cannot resolve some web addresses. The resolv.conf files are managed by systemd-resolved and tell me not to edit them manually. If I do that anyway nothing changes and if I restart sytsemd-resolvd it changes the resolv.conf files back to their original state.



      The search wifi.ns.nl line probably appeared after I tried to connect to a captive wifi network run by ns.nl. After connecting to the wifi, but before accepting the terms on the web portal, I tried to connect with SSH to a server. That didn't work, and accessing any other website through the wifi also did not work. When I came home and connected to my home network, connecting to the server I wanted to connect to still didn't work, and systemd-resolve now says resolve call failed: No appropriate name servers or networks for name found for that server and for *.wifi.ns.nl. (I can still connect to the server using the ip address, and I can resolve the name using dig on a remote dns server, so the problem is only my local DNS resolver.)



      If I do systemd-resolve --status it also tells me 'wifi.ns.nl' is one of my global DNS Domains.



      Apparently something somewhere has remembered some setting probably related to the captive wifi network and wifi.ns.nl. I've tried restarting systemd-resolved, networking, network-manager, but the search entry is still there.



      (I also did a sudo grep -R wifi.ns.nl /etc, it doesn't find 'wifi.ns.nl' anywhere else under /etc other than the resolv.conf file)



      How can I remove that search entry, other than rebooting my system?










      share|improve this question













      My /etc/resolv.conf (and also /run/systemd/resolve/resolv.conf) contain a search entry for wifi.ns.nl that I did not put there and do not want there. It seems related to a problem I have now in that I cannot resolve some web addresses. The resolv.conf files are managed by systemd-resolved and tell me not to edit them manually. If I do that anyway nothing changes and if I restart sytsemd-resolvd it changes the resolv.conf files back to their original state.



      The search wifi.ns.nl line probably appeared after I tried to connect to a captive wifi network run by ns.nl. After connecting to the wifi, but before accepting the terms on the web portal, I tried to connect with SSH to a server. That didn't work, and accessing any other website through the wifi also did not work. When I came home and connected to my home network, connecting to the server I wanted to connect to still didn't work, and systemd-resolve now says resolve call failed: No appropriate name servers or networks for name found for that server and for *.wifi.ns.nl. (I can still connect to the server using the ip address, and I can resolve the name using dig on a remote dns server, so the problem is only my local DNS resolver.)



      If I do systemd-resolve --status it also tells me 'wifi.ns.nl' is one of my global DNS Domains.



      Apparently something somewhere has remembered some setting probably related to the captive wifi network and wifi.ns.nl. I've tried restarting systemd-resolved, networking, network-manager, but the search entry is still there.



      (I also did a sudo grep -R wifi.ns.nl /etc, it doesn't find 'wifi.ns.nl' anywhere else under /etc other than the resolv.conf file)



      How can I remove that search entry, other than rebooting my system?







      dns systemd-resolved






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 29 at 20:53









      JanKanis

      26129




      26129




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          1
          down vote













          It seems to be the bug described here. If both systemd-resolved and the resolvconf package are installed they fight over who gets to manage /etc/resolv.conf. If there are any search lines in that file these domains break for a reason I don't quite understand yet.



          In my case, with both installed /etc/resolv.conf was a symlink to /run/resolvconf/resolv.conf. After removing the resolvconf package it became a symlink to /run/systemd/resolve/stub-resolv.conf and after restarting the systemd-resolved service that fixed the problem.






          share|improve this answer



























            up vote
            0
            down vote













            I have the same problem, and the simplest solution is to edit /etc/resolve.conf and remove the 'search' lines.



            No restarting required, and things work again.



            This, however, is not a solution, as any time I use my vpn or connect my laptop to the work network, it happens all over again. I too don't understand the bug (haven't even tried yet, as I have too many other new annoyances since the switch from Unity on 17.04 to Gnome on 17.10). But that's an answer that addresses your (or others coming later) problem without a reboot.






            share|improve this answer




















              Your Answer







              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "89"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: true,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001130%2fremove-search-entry-from-resolv-conf-in-ubuntu-17-10%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              1
              down vote













              It seems to be the bug described here. If both systemd-resolved and the resolvconf package are installed they fight over who gets to manage /etc/resolv.conf. If there are any search lines in that file these domains break for a reason I don't quite understand yet.



              In my case, with both installed /etc/resolv.conf was a symlink to /run/resolvconf/resolv.conf. After removing the resolvconf package it became a symlink to /run/systemd/resolve/stub-resolv.conf and after restarting the systemd-resolved service that fixed the problem.






              share|improve this answer
























                up vote
                1
                down vote













                It seems to be the bug described here. If both systemd-resolved and the resolvconf package are installed they fight over who gets to manage /etc/resolv.conf. If there are any search lines in that file these domains break for a reason I don't quite understand yet.



                In my case, with both installed /etc/resolv.conf was a symlink to /run/resolvconf/resolv.conf. After removing the resolvconf package it became a symlink to /run/systemd/resolve/stub-resolv.conf and after restarting the systemd-resolved service that fixed the problem.






                share|improve this answer






















                  up vote
                  1
                  down vote










                  up vote
                  1
                  down vote









                  It seems to be the bug described here. If both systemd-resolved and the resolvconf package are installed they fight over who gets to manage /etc/resolv.conf. If there are any search lines in that file these domains break for a reason I don't quite understand yet.



                  In my case, with both installed /etc/resolv.conf was a symlink to /run/resolvconf/resolv.conf. After removing the resolvconf package it became a symlink to /run/systemd/resolve/stub-resolv.conf and after restarting the systemd-resolved service that fixed the problem.






                  share|improve this answer












                  It seems to be the bug described here. If both systemd-resolved and the resolvconf package are installed they fight over who gets to manage /etc/resolv.conf. If there are any search lines in that file these domains break for a reason I don't quite understand yet.



                  In my case, with both installed /etc/resolv.conf was a symlink to /run/resolvconf/resolv.conf. After removing the resolvconf package it became a symlink to /run/systemd/resolve/stub-resolv.conf and after restarting the systemd-resolved service that fixed the problem.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 29 at 21:21









                  JanKanis

                  26129




                  26129






















                      up vote
                      0
                      down vote













                      I have the same problem, and the simplest solution is to edit /etc/resolve.conf and remove the 'search' lines.



                      No restarting required, and things work again.



                      This, however, is not a solution, as any time I use my vpn or connect my laptop to the work network, it happens all over again. I too don't understand the bug (haven't even tried yet, as I have too many other new annoyances since the switch from Unity on 17.04 to Gnome on 17.10). But that's an answer that addresses your (or others coming later) problem without a reboot.






                      share|improve this answer
























                        up vote
                        0
                        down vote













                        I have the same problem, and the simplest solution is to edit /etc/resolve.conf and remove the 'search' lines.



                        No restarting required, and things work again.



                        This, however, is not a solution, as any time I use my vpn or connect my laptop to the work network, it happens all over again. I too don't understand the bug (haven't even tried yet, as I have too many other new annoyances since the switch from Unity on 17.04 to Gnome on 17.10). But that's an answer that addresses your (or others coming later) problem without a reboot.






                        share|improve this answer






















                          up vote
                          0
                          down vote










                          up vote
                          0
                          down vote









                          I have the same problem, and the simplest solution is to edit /etc/resolve.conf and remove the 'search' lines.



                          No restarting required, and things work again.



                          This, however, is not a solution, as any time I use my vpn or connect my laptop to the work network, it happens all over again. I too don't understand the bug (haven't even tried yet, as I have too many other new annoyances since the switch from Unity on 17.04 to Gnome on 17.10). But that's an answer that addresses your (or others coming later) problem without a reboot.






                          share|improve this answer












                          I have the same problem, and the simplest solution is to edit /etc/resolve.conf and remove the 'search' lines.



                          No restarting required, and things work again.



                          This, however, is not a solution, as any time I use my vpn or connect my laptop to the work network, it happens all over again. I too don't understand the bug (haven't even tried yet, as I have too many other new annoyances since the switch from Unity on 17.04 to Gnome on 17.10). But that's an answer that addresses your (or others coming later) problem without a reboot.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Feb 21 at 18:43









                          John

                          19518




                          19518



























                               

                              draft saved


                              draft discarded















































                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1001130%2fremove-search-entry-from-resolv-conf-in-ubuntu-17-10%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Popular posts from this blog

                              Trouble downloading packages list due to a “Hash sum mismatch” error

                              How do so many people here on Academia.SE, and in general, afford lavish higher education programs?

                              Cutting all the characters after the last /