An answer exists for querying AD with password auth, which is working fine locally. What about Kerberos auth? Running ldapsearch with GSSAPI auth yields the following error:
$ ldapsearch -ZZ -Y GSSAPI -H ldap://ad.server.fqdn/ -b "CN=Caleb,CN=Users,DC=samdom,DC=example,DC=com" cn
SASL/GSSAPI authentication started
ldap_sasl_interactive_bind: Local error (-2)
additional info: SASL(-1): generic failure: GSSAPI Error: Unspecified GSS failure. Minor code may provide more information (Server not found in Kerberos database)
$
On the Samba AD DC, this shows in the log file:
...
Kerberos: TGS-REQ caleb@SAMDOM.EXAMPLE.COM from ipv4:<client IP address>:48092 for ldap/<server IP>@SAMDOM.EXAMPLE.COM [canonicalize, renewable]
...
The ticket request is for the DC's IP instead of the server's FQDN, which is clearly incorrect; the server's FQDN is shown in the SPN entries, as it should be. But how do I correct it?
I see this issue even with a minimal krb5.conf
[libdefaults]
default_realm = SAMDOM.EXAMPLE.COM