Windows, unlike Samba, requires the service principal name to be set
when requesting a ticket to that service.
Additionally, default_realm from the libdefaults section of krb5.conf
should be set so that the correct realm is used.
Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 19 02:22:01 UTC 2021 on sn-devel-184
user_name = "ccacheusr"
mach_name = "ccachemac"
+ service = "host"
# Create the user account.
(user_credentials, _) = self.create_account(user_name)
# Create the machine account.
(mach_credentials, _) = self.create_account(mach_name,
- machine_account=True)
+ machine_account=True,
+ spn="%s/%s" % (service,
+ mach_name))
# Talk to the KDC to obtain the service ticket, which gets placed into
# the cache. The machine account name has to match the name in the