Bug 16005 - "net ads join" creates HOST/fqdn principals instead of host/fqdn - breaking unix compatibility..
Summary: "net ads join" creates HOST/fqdn principals instead of host/fqdn - breaking u...
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.23.5
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Pavel Filipenský
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-02-20 18:30 UTC by Peter Eriksson
Modified: 2026-06-24 08:09 UTC (History)
2 users (show)

See Also:


Attachments
Patch to create host<fqdn> principcals instead of HOST<fqdn> (1.68 KB, patch)
2026-02-20 18:30 UTC, Peter Eriksson
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Eriksson 2026-02-20 18:30:04 UTC
Created attachment 18859 [details]
Patch to create host<fqdn> principcals instead of HOST<fqdn>

Here's a patch that "fixes" this problem. It shouldn't be a problem if net ads join tills the AD to create host/<fqdn> since AD is case insensitive, but Unix utilities are not but there might be something I'm not aware of (perhaps make it selectable with some command line option). Anyway, it works for me... 

For an example of a unix tool that breaks if /etc/krb5.keytab contains HOST/<fqdn> is pam_krb5 (on FreeBSD)
Comment 1 Douglas Bagnall 2026-02-20 19:22:13 UTC
hmm, we keep not quite fixing this class of problem.

https://bugzilla.samba.org/show_bug.cgi?id=15759#c3 is relevant. Also, e.g. bug 9699 and bug 3671.
Comment 2 Rowland Penny 2026-06-24 08:09:50 UTC
(In reply to Douglas Bagnall from comment #1)

I have just spent sometime trying to understand why using openssh to connect to a Samba AD DC using GSSAPI didn't work. It basically boiled down to the computers SPN starting with 'HOST/' instead of 'host/'. Adding an SPN that did start with 'host/' cured my problem, but raised the question, should I be able to add an SPN that only differed by case ?

I suppose that I should point out that redhat fixed this in adcli nearly 12 years ago, see:

https://cgit.freedesktop.org/realmd/adcli/commit/?__goaway_challenge=meta-refresh&__goaway_id=80815279b6b8e0bbc0cb45aceb03db0f&__goaway_referer=https%3A%2F%2Fbugzilla.redhat.com%2F&id=ec132a3add4c41a9c1efa6c12b2c900df66151d1