Join a domain independently of local hostname

Isaac Boukris iboukris at redhat.com
Wed Aug 28 17:08:11 UTC 2019


Hello,

In the join process, if we get an fqdn from getaddrinfo for local
machine then we prefer to use that for dnsHostName and fqdn SPN over
nbname+realm, see:
https://github.com/samba-team/samba/blob/1f923e067dbe358c17cbccfe179baa811aa3b8b3/source3/libnet/libnet_join.c#L523

I'm working on a ticket where the customer wants to be able to join a
domain based only on netbios name from smb.conf, independently of
local machine hostname (reportedly, this used to work). The problem
they are facing, is that the fqdn returned from getaddrinfo, sometimes
has already got a registered SPN and the join fails with "Failed to
set machine spn: Constraint violation".

I wonder how can we accommodated this use case, maybe we can fallback
to nbname+realm if we get this error, or perhaps by adding a new
parameter to net-join specifying the machine fqdn, or a new smb.conf
option ?

Thanks!



More information about the samba-technical mailing list