Skip to content
-
Subscribe to our newsletter & never miss our best posts. Subscribe Now!
  • https://www.facebook.com/
  • https://twitter.com/
  • https://t.me/
  • https://www.instagram.com/
  • https://youtube.com/
Cloud Security Tips Cloud Security Tips

What is cloud security

Cloud Security Tips Cloud Security Tips

What is cloud security

  • Home
  • About us
  • Contact us
  • Home
  • About us
  • Contact us
Subscribe
Close

Search

Directory server tree diagram with users, groups, and a central server, illustrating Active Directory and LDAP concepts behind Group Policy Objects
Security Tips

Server Principal Name (SPN): What It Is, How Kerberos Uses It, and How to Secure It

By admin
November 7, 2026 6 Min Read
1

A Server Principal Name (SPN) is the unique name that identifies a service on a network so clients can authenticate to it with Kerberos. If you have ever seen an error such as “Cannot find the computer account” or “The target principal name is incorrect,” a missing or duplicate SPN is a likely cause. This guide explains what a Server Principal Name is, how Kerberos uses SPNs, how to create and troubleshoot them, and — most importantly — how attackers abuse them in Kerberoasting attacks.

Most SPN guides stop at the syntax and the setspn command. This one adds what competitors miss: a security-first treatment of Kerberoasting, duplicate-SPN troubleshooting in hybrid and cloud environments, and a practical checklist for auditing SPNs before an attacker does.

Server Principal Name concept: directory server tree diagram with users, groups, and a central server

Table of Contents

Toggle
  • What Is a Server Principal Name?
  • SPN Format and Examples
  • How Kerberos Uses SPNs
  • SPN vs. UPN vs. Distinguished Name
  • How to Create, View, and Delete SPNs
  • Kerberoasting: How Attackers Abuse SPNs
  • Troubleshooting SPN Problems
  • Frequently Asked Questions
    • What is a Server Principal Name in simple terms?
    • How do I find SPNs in Active Directory?
    • Can two accounts have the same SPN?
    • What is Kerberoasting?
    • Do I need SPNs in the cloud?
  • Conclusion

What Is a Server Principal Name?

A Server Principal Name is an identifier that a Kerberos client uses to request a service ticket for a specific service on a specific host. It is stored as an attribute of a service account in Active Directory, usually a computer account or a managed service account. When a user wants to connect to a service — for example, a SQL Server, a web server, or a file share — the client asks the domain controller for a ticket for that service’s SPN, and the domain controller issues it only if the SPN exists and is unique.

Without an SPN, Kerberos cannot work for that service, and the client falls back to NTLM, which is weaker and harder to audit. A missing SPN is therefore both a reliability problem and a security problem.

SPN Format and Examples

An SPN has the form service/host@REALM, where the service class identifies the type of service, the host is the server name, and the realm is the Kerberos domain. Common examples include:

  • MSSQLSvc/sql01.example.com:1433 — a SQL Server instance
  • HTTP/web01.example.com — a web server
  • HOST/server01.example.com — general host services, including file shares
  • CIFS/fileserver.example.com — a file server
  • LDAP/dc01.example.com — a domain controller’s directory service

The service class matters: a client requesting HTTP/web01 asks for a different ticket from one requesting MSSQLSvc/web01, even if they are the same machine. Register the SPN under the account that runs the service, not under a random administrator account, or Kerberos will fail.

How Kerberos Uses SPNs

Kerberos authentication works in three steps. First, the client authenticates to the domain controller and receives a ticket-granting ticket. Second, the client asks the domain controller for a service ticket for the SPN of the service it wants. Third, the client presents that ticket to the service, which decrypts it with the service account’s key and confirms the user’s identity — without the user’s password ever crossing the network.

That design is why SPNs must be unique. If two accounts have the same SPN, the domain controller does not know which key to use, and authentication fails or goes to the wrong service. Duplicate SPNs are one of the most common causes of intermittent Kerberos failures in large domains.

SPN vs. UPN vs. Distinguished Name

Identifier What it identifies Example
SPN A service instance on a host HTTP/web01.example.com
UPN A user account jdoe@example.com
Distinguished name An object in the directory tree CN=web01,OU=Servers,DC=example,DC=com
SAM account name A user or computer, legacy format EXAMPLE\jdoe

Think of it this way: the UPN identifies who you are, the SPN identifies what you want to connect to, and the distinguished name identifies where that object lives in Active Directory. Identity systems depend on all three, and confusing them is a common source of configuration errors. For the directory behind them, see our guide to LDAP and how it stores and queries those objects.

How to Create, View, and Delete SPNs

Use the setspn command on Windows. To list the SPNs for an account, run setspn -L accountname. To add one, run setspn -S HTTP/web01.example.com serviceaccount — the -S flag checks for duplicates before adding. To delete one, run setspn -D HTTP/web01.example.com serviceaccount. To find duplicates across the domain, run setspn -X.

Prefer managed service accounts (gMSAs) where possible: they manage their own passwords, rotate them automatically, and reduce the risk of a service account password being known to too many people. Document every SPN you create, including the service, the host, the account, and the reason — that inventory is the basis for the audit below.

Kerberoasting: How Attackers Abuse SPNs

Kerberoasting is the attack that makes SPNs a security issue, not just an operations issue. Any authenticated user can request a service ticket for any SPN, and the ticket is encrypted with the service account’s password hash. An attacker who requests tickets for many SPNs can take them offline and crack the weak ones — often service accounts with old, simple passwords that were set years ago and never changed.

Defend against Kerberoasting by using long, random passwords for service accounts (25 characters or more), using gMSAs, removing unused SPNs, and monitoring for unusual ticket requests — for example, a single user requesting tickets for many services in a short time. That monitoring is part of good access control: our guide to role-based access control (RBAC) explains how to limit who can request what in the first place.

Troubleshooting SPN Problems

Common symptoms include “The target principal name is incorrect,” Kerberos falling back to NTLM, and authentication working for some users but not others. Check for duplicate SPNs with setspn -X, confirm the SPN is registered under the account that actually runs the service, check that the service’s DNS name matches the SPN host, and verify the time is synchronized — Kerberos tickets expire if clocks drift by more than five minutes. In hybrid cloud environments, also check that the SPN exists in the on-premises domain and that the cloud service can reach a domain controller to validate it.

Directory services are the backbone of this work, so keep them healthy. Our guide to the Global Catalog explains how Active Directory finds objects across domains when a client asks for a service.

Frequently Asked Questions

What is a Server Principal Name in simple terms?

A Server Principal Name is the unique address Kerberos uses to find a service — for example, HTTP/web01.example.com for a web server. Without it, Kerberos cannot issue a ticket for that service.

How do I find SPNs in Active Directory?

Run setspn -L accountname for one account, or setspn -X to find duplicate SPNs across the domain. You can also query the servicePrincipalName attribute in Active Directory Users and Computers.

Can two accounts have the same SPN?

No. SPNs must be unique in a domain. A duplicate SPN causes Kerberos authentication to fail or to go to the wrong service, so use setspn -S when adding one, because it checks for duplicates first.

What is Kerberoasting?

Kerberoasting is an attack in which an authenticated user requests service tickets for SPNs and cracks them offline to recover weak service-account passwords. Long, random passwords and managed service accounts are the best defenses.

Do I need SPNs in the cloud?

Yes, if you use Kerberos in a hybrid environment. Cloud services that join an on-premises domain, and services that authenticate with Kerberos, still need SPNs — and the same uniqueness and password rules apply.

Conclusion

A Server Principal Name is a small piece of configuration with a large impact: it is the address Kerberos uses to find a service, and a missing or duplicate SPN can break authentication across your network. Register SPNs under the right account, keep them unique, use managed service accounts, and audit them regularly for Kerberoasting risk. Do that, and Kerberos will do what it was designed to do — prove identity without ever sending a password across the network.

Author

admin

Follow Me
Other Articles
Post Office Protocol (POP3) email security concept: an encrypted email shield on a laptop screen
Previous

POP3 Explained: What the Post Office Protocol Is and When to Use It

Interactive Voice Response concept: desk phones connected to a blue cloud network with voice signals
Next

What Is IVR? Interactive Voice Response Explained, With Examples and Security Tips

One Comment
  1. Kerberoasting: Detection, Prevention, and Hardening Guide says:
    November 18, 2026 at 4:29 am

    […] a detailed explanation of SPNs and how Kerberos uses them, see our guide to Server Principal Name (SPN): What It Is, How Kerberos Uses It, and How to Secure It. Kerberoasting is, in effect, an attack on the SPN system, so understanding SPNs is the first step […]

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Compliance Risk Assessment: A Complete Guide for 2026
  • SX SFP Module: What It Is, How It Works, and When to Use It
  • Hotspot 2.0 (Wi-Fi Passpoint): What It Is and How It Works
  • Volume Boot Record (VBR): What It Is, How It Works, and How to Fix It
  • Can Website Owners See Who Visits Their Website? What They Can (and Cannot) See

Recent Comments

  1. Compliance Risk Assessment: A Complete Guide for 2026 on ISO 27001 Compliance: What It Is, How to Get Certified, and How to Stay Compliant
  2. SX SFP Module: What It Is, How It Works & When to Use It on Network Access Control: What It Is, How It Works, Types and Examples
  3. Hotspot 2.0 (Wi-Fi Passpoint): What It Is & How It Works on WIPS: What Is a Wireless Intrusion Prevention System?
  4. Volume Boot Record (VBR): What It Is & How to Fix It on Hypervisor: What It Is, Types, Security Risks and How to Harden It
  5. Can Website Owners See Who Visits? What They See & Can't See on California Consumer Privacy Act (CCPA): What It Is, Your Rights, and How to Comply in 2026

Archives

  • November 2026
  • October 2026
  • September 2026
  • August 2026
  • July 2026
  • June 2026
  • May 2026
  • February 2026

Categories

  • Blog
  • Business
  • Security Tips
  • Tech
  • Travel
  • Uncategorized
Copyright 2026 — Cloud Security Tips. All rights reserved. Blogsy WordPress Theme

Powered by CookieAdmin
Necessary cookies enable essential site features like secure log-ins and consent preference adjustments. They do not store personal data.
None
Functional cookies support features like content sharing on social media, collecting feedback, and enabling third-party tools.
None
Analytical cookies track visitor interactions, providing insights on metrics like visitor count, bounce rate, and traffic sources.
None
Advertisement cookies deliver personalized ads based on your previous visits and analyze the effectiveness of ad campaigns.
None
Unclassified cookies are cookies that we are in the process of classifying, together with the providers of individual cookies.
None
Powered by CookieAdmin