[Samba] Joining a DC does not set dns forwarder

Jonathon Reinhart jonathon.reinhart at gmail.com
Fri Jun 14 03:35:16 UTC 2019


Hello,

When creating a new Samba AD Domain (using `samba-tool domain
provision`), samba-tool will copy your current nameserver from
/etc/resolv.conf to `dns forwarder` in the newly-generated smb.conf.

However, when joining a DC (using `samba-tool domain join`),
samba-tool does not write `dns forwarder` to the new smb.conf. Is
there any reason Samba should be inconsistent here? After all, a DC is
a DC...

I plan to open a ticket on Bugzilla (once my account is created).
Until this is fixed (?) I feel like the Wiki [1] should be updated to
indicate that a forwarder must be manually configured. Particularly
because a) it's different from provision, b) the AD DC configuration
tends to be more up-front, and less hacking on smb.conf.

CODE
During a new provision, the code will get the current nameserver from
/etc/resolv.conf [2], and pass it as `dns_forwarder` to `provision()`
which will write into the newly-generated smb.conf [3]. During a join,
the code does not pass `dns_forwarder`[4].

Regards,
Jonathon


[1] https://wiki.samba.org/index.php/Joining_a_Samba_DC_to_an_Existing_Active_Directory
[2] https://gitlab.com/samba-team/samba/blob/samba-4.10.4/python/samba/netcmd/domain.py#L377
[3] https://gitlab.com/samba-team/samba/blob/samba-4.10.4/python/samba/provision/__init__.py#L2172
[4] https://gitlab.com/samba-team/samba/blob/samba-4.10.4/python/samba/join.py#L1738



More information about the samba mailing list