[Samba] NetworkManager, DNS, and resolv.conf
L.P.H. van Belle
belle at bazuin.nl
Tue Mar 8 16:06:02 UTC 2022
Is a good read on this subject.
https://www.ricmedia.com/set-permanent-dns-nameservers-ubuntu-debian-resolv-conf/
https://www.ricmedia.com/set-custom-dns-servers-on-ubuntu-18-or-20/
> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens
> Patrick Goetz via samba
> Verzonden: dinsdag 8 maart 2022 16:35
> Aan: Jürgen Echter
> CC: Samba listserv
> Onderwerp: Re: [Samba] NetworkManager, DNS, and resolv.conf
>
> On 3/8/22 01:02, Jürgen Echter wrote:
> > Hi,
> >
> > for me it worked when i disabled auto-dns and set the
> search domain and
> > dns server manually like this:
> >
> > nmcli con mod enp1s0 ipv4.ignore-auto-dns yes
> > nmcli con mod enp1s0 ipv4.dns "192.168.1.80"
> > nmcli con mod enp1s0 ipv4.dns-search "samdom"
> >
>
> Presumably ignore-auto-dns=yes sets
>
> [main]
> dns=none
>
> in /etc/NetworkManager.conf? I couldn't get this to work on
> my Ubuntu
> 20.04 test VM:
>
> root at erap-ubuntu:~# nmcli
> enp0s3: connected to Wired connection 1
> ...
>
> root at erap-ubuntu:~# nmcli con mod enp0s3 ipv4.ignore-auto-dns yes
> Error: unknown connection 'enp0s3'.
>
> Not sure I get that one, and the option doesn't even show up in the
> graphical interface; maybe this is an Ubuntu Mate specific
> modification.
>
> However, to be clear, there are N ways to get around this,
> but the point
> of my post was that a user with a NetworkManager system following the
> Wiki page on setting up a Samba client would get confused by the
> /etc/resolv.conf instructions when NetworkManager restarts
> and rewrites
> resolv.conf, and further that the systemd-resolved stub file entry:
>
> nameserver 127.0.0.53
>
> works fine on Samba clients as long as you've set the correct AD
> nameserver entry in the system-connections file using either nmcli or
> the graphical interface. This is then set dynamically on boot in
>
> /run/systemd/resolve/resolv.conf
>
> If you just followed the previous Wiki instructions and had
> configured a
> different nameserver on installation, domain name resolution
> would break
> as soon as the system reboots because NetworkManager will reset it by
> default, at least on Ubuntu systems. Simple is best as long
> as simple
> works.
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba
>
>
More information about the samba
mailing list