Kevin Holman's System Center Blog

Posts in this blog are provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of UseAre you interested in having a dedicated engineer that will be your Mic

OpsMgr 2012: What should the SPN’s look like?

OpsMgr 2012: What should the SPN’s look like?

  • Comments 19
  • Likes

 

SPN’s (Service Principal Names) settings are very similar in OpsMgr 2012 as they were in OpsMgr 2007.  However, since the SDK (Data Access) service runs on ALL management servers now… the SPN’s for the SDK (DAS) account will be different now.

If you deploy OpsMgr using a standard domain user account for the SDK service, you might see alerts like the following:

Data Access Service SPN Not Registered

The System Center Data Access service failed to register an SPN. A domain admin needs to add MSOMSdkSvc/SCOM03 and MSOMSdkSvc/SCOM03.opsmgr.net to the servicePrincipalName of CN=SCOM03,CN=Computers,DC=opsmgr,DC=net

This is caused by the fact that when the SDK service (System Center Data Access Service) starts up, it tried to ensure/update the SPN on the account that the SDK service is running under.  By default in a domain, a standard user account does not have the right to update its own SPN.  A domain admin should create the SPN in this case.

HOWEVER – the above alert is in error, and is a bug.  It is telling me that I need the SPN’s on the COMPUTER account of a management server, which is NOT correct.  When I use a domain account for my SDK/DAS service – I need the SPN to be placed on the domain account that runs the service.

The issue remains for SCOM 2012, 2012 SP1, and 2012 R2.

To see your SPN’s… open a command prompt and verify your SPN for you domain SDK account:

C:\>setspn -L DOMAIN\sdkdomainuseraccount

The output should be something like:

Registered ServicePrincipalNames for CN=sdkdomainuseraccount,OU=Service Accounts,OU=Accounts,OU=US,DC=domain,DC=com:
        MSOMSdkSvc/SCOM01
        MSOMSdkSvc/SCOM01.opsmgr.net
        MSOMSdkSvc/SCOM02
        MSOMSdkSvc/SCOM02.opsmgr.net

You might not have ANY SPN’s here by default.  That’s ok, they need to be added.

Notice how this has changed from OpsMgr 2007:  The SDK domain account SPN now has SDK SPN’s for ALL management servers, instead of just the RMS.

The HealthService SPN’s have not changed for Management server computer accounts, and this is handled automatically and should not require any modification.  What we SHOULD NOT see here is any SPN’s for the MSOMSdkSvc on the management server computer accounts (if we are using a domain account for the SDK/DAS service)

C:\>setspn -L SCOM01

The output:

Registered ServicePrincipalNames for CN=SCOM01,CN=Computers,DC=domain,DC=com:
        MSOMHSvc/SCOM01 
        MSOMHSvc/SCOM01.opsmgr.net
        WSMAN/SCOM01.opsmgr.net
        WSMAN/SCOM01
        TERMSRV/SCOM01
        TERMSRV/SCOM01.opsmgr.net
        RestrictedKrbHost/SCOM01
        HOST/SCOM01
        RestrictedKrbHost/SCOM01.opsmgr.net
        HOST/SCOM01.opsmgr.net

*Note – In SCOM 2012 – you might notice that every time your management server service is restarted, or rebooted, that we log an event (and create an alert) that the SPN’s are incorrect.  This event/alert is in error, it is complaining the the SDK SPN is missing from the management server COMPTUER account, which should ONLY be the case if you were using local system for the SDK service.  Ignore this event and alert.

Now, how do we add the SPN’s in the right place?  First you will a domain admin to do this, or be granted rights to be able to write the SPN’s to an object.

In my case, for a new environment, I don’t have any SPN’s set on my domain account which is running my DAS.  Therefore I will see to set these.  In Windows Server 2008R2 – the command is SETSPN –A.   In WS2012, it changed to SETPSPN –S which checks for duplicates before it allows you to create them.

I have three management servers:  SCOM01, SCOM02, and SCOM03.  Therefore I will need to create/add 6 SPN’s:

setspn -S MSOMSdkSvc/SCOM01.opsmgr.net OPSMGR\omdas
setspn -S MSOMSdkSvc/SCOM01 OPSMGR\omdas
setspn -S MSOMSdkSvc/SCOM02.opsmgr.net OPSMGR\omdas
setspn -S MSOMSdkSvc/SCOM02 OPSMGR\omdas
setspn -S MSOMSdkSvc/SCOM03.opsmgr.net OPSMGR\omdas
setspn -S MSOMSdkSvc/SCOM03 OPSMGR\omdas

Now when I query my SPN for my domain account which runs my SDK/DAS service on all my management servers:

setspn -L OPSMGR\omdas

Registered ServicePrincipalNames for CN=omdas,OU=SCOM,OU=US,DC=opsmgr,DC=net:
        MSOMSdkSvc/SCOM03
        MSOMSdkSvc/SCOM03.opsmgr.net
        MSOMSdkSvc/SCOM02
        MSOMSdkSvc/SCOM02.opsmgr.net
        MSOMSdkSvc/SCOM01
        MSOMSdkSvc/SCOM01.opsmgr.net

and for each management server:

C:\Windows\system32>setspn -L SCOM01
Registered ServicePrincipalNames for CN=SCOM01,CN=Computers,DC=opsmgr,DC=net:
        AdtServer/SCOM01
        AdtServer/SCOM01.opsmgr.net
        MSOMHSvc/SCOM01.opsmgr.net
        MSOMHSvc/SCOM01
        WSMAN/SCOM01.opsmgr.net
        WSMAN/SCOM01
        TERMSRV/SCOM01.opsmgr.net
        TERMSRV/SCOM01
        RestrictedKrbHost/SCOM01
        HOST/SCOM01
        RestrictedKrbHost/SCOM01.opsmgr.net
        HOST/SCOM01.opsmgr.net

C:\Windows\system32>setspn -L SCOM02
Registered ServicePrincipalNames for CN=SCOM02,CN=Computers,DC=opsmgr,DC=net:
        WSMAN/SCOM02
        WSMAN/SCOM02.opsmgr.net
        MSOMHSvc/SCOM02.opsmgr.net
        MSOMHSvc/SCOM02

        TERMSRV/SCOM02.opsmgr.net
        TERMSRV/SCOM02
        RestrictedKrbHost/SCOM02
        HOST/SCOM02
        RestrictedKrbHost/SCOM02.opsmgr.net
        HOST/SCOM02.opsmgr.net

C:\Windows\system32>setspn -L SCOM03
Registered ServicePrincipalNames for CN=SCOM03,CN=Computers,DC=opsmgr,DC=net:
        WSMAN/SCOM03.opsmgr.net
        WSMAN/SCOM03
        MSOMHSvc/SCOM03
        MSOMHSvc/SCOM03.opsmgr.net
        TERMSRV/SCOM03
        TERMSRV/SCOM03.opsmgr.net
        RestrictedKrbHost/SCOM03
        HOST/SCOM03
        RestrictedKrbHost/SCOM03.opsmgr.net
        HOST/SCOM03.opsmgr.net

 

Now they are correct, and no duplicates exist.  Again – the example above is for when you are suing a domain account for your SDK/DAS services on your management servers, which is typical.

Comments
  • Thanks Kevin!

    -Tom

  • Can you confirm this is correct for OM12?  We are still seeing the errors in the Operations Manager log and alerts generated in OM12 regarding SPN's.  Apparently the SDK wants us to add the SPN to each MS computer, rather than the SDK domain account...

  • Yes - from what I can tell - the event/alert is a bug, and is incorrect.  The SPN's are the same as they were in OpsMgr 2007 - the SDK SPN for the DAS account should be attached to the domain user account, not the Computer account in the domain.  The only difference between OpsMgr 2007 and OM12 is that there will be multiple SDK SPN's on the domain user account that runs the SDK service, one for each management server since all run the SDK service.

  • We setup our SPN's correctly registering the MSOMSdkSvc/<mgmtSvr> SPN's to the SDK service account and removing from the Ops Manager Server computer accounts. However everytime we restart a managment server or just restart the SDK service a duplicate MSOMSdkSvc/mgmtSvr gets registered against the ops manager server account.

  • Kevin,

    I have new setup of SCOM 2012

    sdk service is running under a user account

    when i go to ADSIEDIT and check spn's under the user account it does not show any spn registered for MSOMSDKSVC

    i see the spn registered for MSOMSDKSVC under the management server computer account

    i have not edited the spn's manually

    is this alright? i do not see any errors in event log whenever the services are restarted...kindly validate

  • I have a small confusion. Is SPN registration to done at SCOM management server or domain controller?

  • Anil - SPN's are registered in AD, so i doesn't matter where you do it from, so long as the account you're using has Domain Admin privileges. The SPN for the MSOMHSvc entry should point to your management server. (e.g.  MSOMHSvc/ManagementServerName)

  • Surprised this was not fixed in 2012 R2...

  • does setspn -L work

    I cant see it as an option.  

  • I dont understand why you couldn't just put the correct spn commands that I need to add my domain account spns, That would have been much easier since anytime I use the domain account setspn -L (domainuseraccount) I get no spns. I will look elsewhere for this info.

  • setspm -L fails for our 2012 servers also. When I ran setspn -l SPN MSOMHSvc where missing. I simply elevated

    On boot SCOM console complained that the svc account/SPNs are not configured. To resolve I simply temporarily raised the svcDAS account up to Domain Admin, rebooted both MS machines, removed Domain Admin privileges and checked for the presence of MSOMHSvc using setspn -l both had been created correctly and no more errors in console at boot.

  • @LeaUK -
    That is a the worst thing you could do. The alert in SCOM is a bug and wrong. When you use a domain account for the SDK/DAS account, the SPN's should be written to the domain account and not the computer account. When you made the service account a domain admin, it now had rights to write the SPN, which it wrote to the computer account.... and should not have done so.

  • Hi Kevin, thanks for the reply. What are the consequences - do I need to remove these incorrect SPNs? Or can they be left without impact? I'm not sure why but I didn't spot your advice from: 'Now, how do we add the SPN’s in the right place?....' and your following guidance :-(

    I assume I still need to follow this to configure the SPNs and link them to the domain account?

    I've also spotted why setspn -l kept failing for me, I copied/pasted the command from above and the format of the minus/dash (-) symbol must get changed. Typing the command in manually resolved!

    I appreciate your help and your Blog has been absolutely essential in assisting with our deployment. Thank you.

  • Hi Leau -

    You didn't spot that because I just added it. I realized my article must not be complete enough because there remains confusion, so I added more context to clarify it. :-)

    You should remove SDK SPN's from the computer accounts because they are wrong, and should be on the domain account running the DAS service. You should NOT ever have duplicate SPN's, the AD people will get angry about that. As to if you need them? These are used for Kerberos authentication for the SDK. However, in most cases they aren't necessary as console authentications will fall back to NTLM. They become more critical when you do things like place a web console server on a non-management server, or ever need to set up constrained delegation for multiple-hop Kerberos authentications.... such as when using windows auth to the web console when it isn't running on a local management server.

  • Hi Kevin

    To assist others perhaps the line: 'HOWEVER – the above alert is in error, and is a bug.' could stand out somehow so others do not gloss over it in the same way I did :-)

    Thanks for adding this recent additional info with step by step guidance on setting SPNs, this is brilliant - I wondered how I 'missed' this...

    As I now can't create the correct SPNs (duplicate warnings are presented) I suspect one last helpful post would be a guide in removing the offending SPNs - as no matter what combination of Setspn.exe -D I use it fails :-( I shall post back when I discover the correct syntax.

    Edit - found it: (using your POC example domain)

    setspn.exe -d MSOMSdkSvc/SCOM01 opsmngr\SCOM01
    setspn.exe -d MSOMSdkSvc/SCOM01.opsmngr.net opsmngr\SCOM01

    Thanks again


Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
Search Blogs