Duplicate domain name in /etc/resolv.conf

L.S.,

On my laptop running Tumbleweed, I currently have an issue with the DNS search order in /etc/resolv.conf, where the correct search domain is listed twice. The second entry is concatenated to the first.

It looks something like this (replaced the real domain with mydomain.com in the example below):


search mydomain.commydomain.com

In order to fix this, I already tried restart the networking services, restarting the machine, recreating the /etc/resolv.conf file with netconfig. Just to be sure, I also ran a grep for the duplicated domain name across everything in /etc, just to make sure I didn’t inadvertently configure the extra domain.com to be appended/prepended. I also check the dhclient.leases file and that seems to contain the correct information:


option domain-name "mydomain.com";

As a workaround, I now modified dhclient.conf to supersede the domain-search. Any suggestions on what else to look at or how to get this solved?

Thanks,

Gert Vanthienen

Since you’re running on a laptop,
I assume you’re using Network Manager.

If so,
then in the netconfig MAN pages, the recommendation is to make all your DNS configurations in Network Manager and not in netconfig configuration file.

man netconfig

TSU

L.S.,

I’m using NetworkManager with no extra settings specified - it should just be using DHCP according to the configuration dialogs. It looks like there’s an open bug report for this issue at https://bugzilla.gnome.org/show_bug.cgi?id=778430

If anyone else is bumping into this, I did notice there’s an easy workaround: just adding this empty bit of configuration to the /etc/dhclient.conf file is enough to avoid the duplicated domain search value.


interface "enp62s0u1" {
   # nothing here 
}

Regards,

Gert Vanthienen