Pcornel
Identity · Kerberos

SPN

Cheat sheet · https://pcornel.dk/topic.php?topic=3281

Back to the Topic

Answer

An SPN (Service Principal Name), like HTTP/web01.corp.local, links a service to the account it runs as so the KDC can issue tickets for it. Missing or duplicate SPNs make Kerberos fail or fall back to NTLM.

Remember

  • Each SPN must be unique in the forest.
  • It is registered on the account the service runs as.
  • Every name clients use needs its own SPN.

First checks

  • klist — Kerberos tickets in the session
  • klist purge — clear tickets
  • setspn -Q <spn> — find which account has an SPN
  • nltest /dsgetdc:<domain> /kdc — find a KDC
  • Get-WinEvent -FilterHashtable @{LogName='Security';Id=4768,4769,4771} — KDC events on DCs

Commands

setspn -L <account>
Lists the service principal names (SPNs) registered on a user or computer account.
setspn -Q <spn>
Searches the domain for an SPN and shows which account holds it.

Verify in this order

service name → SPN → account whose key encrypts the ticket

Where it usually breaks

First mismatch in forest/domain/object identity → authoritative DC/source policy → replication/KDC/GP processing → client token/effective policy → target resource → event/audit verification; preserve identity/native error/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3281

Confirmation

Confirm action

Continue?