[Samba] No DNS domain configured

L.P.H. van Belle belle at bazuin.nl
Wed Sep 9 07:32:21 UTC 2020

Hai marco, 

> but this is not the default...
Exectly, in this case im a bit ahead of the standard.
But thats only because i noticed how easy it is to configure things, 
which make configuring everything more easy, 
.. after  you learned systemd a bit. ;-). 
It's not that hard just start with one part, 
and start with where it begins. Networking.. ;-) 

Why i use systemd now. 

1) 1 file per interface containing
  IP, gateway, dns servers, ntp servers, routing. 
  To start with. (you can add more, but thats what i use.)
  or bonding network interaces, you name it. 

2) if you have multlple interface, no more ip2route and routing tables.
   I add these in the network-interface files. ( see 1). ) 

3) Way better methode to chainlink services and make a better (and faster) boot order.

The other extra from this, i have less packages installed and that means less security upgrades. 
So less update, less risk, less space used, quicker backups. 

For example I dont install any ntp or dns related software on the domain members anymore.
Because its just not needed, thats now all in systemd. 

Configure resolv.conf nope, same here, handled by systemd.
And.. Always correct once its set. 

In the config of my network file i have : 

# make use of systemd resolved and its setup, setup the 'search dnsdomain.tld.'
Domains=internel.example.com example.com 

If you like it like this. 

Both setups work fine.

And the even better part here is, you can use it per interface and/or as global setting. 
And/or inherit parts or mix configs. 

The systemd networking part is really worth having a good look at. 
Yes, i hated it also in the beginning, now, its the only thing im using. 

.. ;-) even im using Debian.
There ArchLinux and wiki is way better ;-) 
Where do you think i got my example from :-)) 

A small samba-ad-dc.service file tip. 
systemctl edit service-name.service automaticly creates the override files as shown below.
systemctl --full edit service-name.service  # makes a copy of the original files and you can use that. 
Not adviced, use the system defaults and make overrides, better. 

systemctl edit samba-ad-dc
# /etc/systemd/system/samba-ad-dc.service.d/override.conf
After=network.target network-online.target bind9.service

Load Samba-ad-dc after; network up and is online and bind9 is also loaded.
IMO, bind9.service should always be in the samba-ad-dc.service file. 

And if you do run with bind.
systemctl edit bind9
# /etc/systemd/system/bind9.service.d/override.conf

And stop bind from reloading and possible blocking samba.  ;-) 

> -----Oorspronkelijk bericht-----
> Van: samba [mailto:samba-bounces at lists.samba.org] Namens 
> Marco Gaiarin via samba
> Verzonden: dinsdag 8 september 2020 17:47
> Aan: samba at lists.samba.org
> Onderwerp: Re: [Samba] No DNS domain configured
> Mandi! L.P.H. van Belle via samba
>   In chel di` si favelave...
> > Well, "My" preffered for now is systemd-networkd.
> > Current debian still used /etc/network/ but next will be 
> systemd as default. 
> > Ubuntu uses : /etc/netplan/
> > Howto configure it. 
> Ok, but also in buster the default/predefined method of interface
> configuration is /etc/network/interfaces, right? This script *ENABLE*
> systemd-networkd, but this is not the default...
Correct, only, This script *ENABLE* systemd-networkd? No. 

The script only generated a systemd-networkd complainand config file for you.
(placed where you run the script.)

And in shows you the commands how to enable it all. 

Since i use systemd its networking and that setup with automounting. 

> > When thats done, you wanted NFS or CIFS mounts (automounts) 
> > Search "Re: [Samba] samba4 kerberized nfs4 with sssd ad 
> client" in the list
> If you mean this:
> 	https://lists.samba.org/archive/samba/2020-July/231149.html
> i need to use CIFS (that indeed i supose is simpler then 
> NFS), not NFS.

That setup, works here for me perfectly, years now, with NFSv4  and it does not matter which security setting i use.  (sys,krb5(i/p) 

There is one thing i have to mention. 
Depending on the ACL's you use on the homedir. 
You can deny root, if that happend, automouting (independed on the setup) will fail most probely.

Add this in libdefaults in /etc/krb5.conf 

    ; read: https://bugs.launchpad.net/ubuntu/+source/heimdal/+bug/1484262
    ignore_k5login = true

Also, in both cases, CIFS and NFS, you can add root/hostname.fqdn.tld at REALM 
If you have mount problem, this might help and with it you should be able
 to find whats off and why (cifs/nfs)\UPN isn't working. 

> > back to my work, i have a crashed server, disks dyed. 
> My condolences. ;-
Yeah, pff. 2 disks in the same raid.. Aaah, but i revived them.. 
And that made the spare jump in.  3 disk in a set and 
offcourse the 2 one running stopped.. 

Ah, its up again and new server is ordered..  :-) new toys.. :-)



More information about the samba mailing list