Bug 4604 - "net ads join" fails with servicePrincipalNames errors
Summary: "net ads join" fails with servicePrincipalNames errors
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: net utility (show other bugs)
Version: 3.0.24
Hardware: x86 Linux
: P3 normal
Target Milestone: 3.0.26
Assignee: Björn Jacke
QA Contact: Samba QA Contact
Depends on:
Reported: 2007-05-09 17:29 UTC by James Ralston
Modified: 2020-12-20 22:08 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description James Ralston 2007-05-09 17:29:09 UTC
net ads join fails with servicePrincipalNames errors

We have a server:


In the server's smb.conf file, we have:

    netbios name = LONGHOST

Our AD domain is AD.EXAMPLE.COM; our workgroup is NETSERVICES.

Attempting to join the AD domain fails, even if a Domain Admin credentials are used:

$ net ads join
Using short domain name -- NETSERVICES
Failed to set servicePrincipalNames. Please ensure that
the DNS domain of this server matches the AD domain,
Or rejoin with using Domain Admin credentials.
Disabled account for 'LONGHOST' in realm 'AD.EXAMPLE.COM'

Through trial and error, we discovered that if we comment out the
"netbios name" setting in the smb.conf file and change the hostname of
the server to:


...then the "net ads join" command succeeds with no errors or warnings.

So, some combination of these conditions causes badness:

1.  The domain of the client doesn't match the AD domain.
2.  The first component of the client's FQDN is greater than 15 characters.
3.  The client's netbios name differs from the first component its FQDN.

If this isn't a known issue, we can attempt to pin down the exact circumstances that cause the problem...
Comment 1 Gerald (Jerry) Carter (dead mail address) 2007-05-10 07:18:20 UTC
This is a known limitation currently.  You cannot join a Samba
host to an AD domain when netbios name != hostname.  I'll fix properly
for 3.0.26.
Comment 2 Björn Jacke 2020-12-20 22:08:45 UTC
SPN creation has been reworked a while ago