Home > error code 0x7 kdc_err_s_principal_unknown

How to fix error code 0x7 KDC_ERR_S_PRINCIPAL_UNKNOWN?

Alton Alexander
By Alton AlexanderUpdated on June 4th, 2022

The error code 0x7 kdc_err_s_principal_unknown means that the Kerberos server could not find a matching principal in its database. This can happen for a number of reasons, such as if the principal does not exist in the database, or if the database is not configured correctly.

1. Check that the requested service is running on the KDC

To check that the requested service is running on the KDC, the administrator would use the following steps:

  1. Open a command prompt on the KDC.
  2. Type "netstat -an" and press Enter.
  3. Type "netstat -an -tcp" and press Enter.
  4. Type "netstat -an -udp" and press Enter.
  5. Type "netstat -an -tcp6" and press Enter.
  6. Type "netstat -an -udp6" and press Enter.
  7. If there are any errors, the administrator would investigate the cause and correct the error.

2. Check that the KDC has a record of the requested service

  1. Verify that the KDC has an entry for the requested service in its Service Principal Names (SPN) database.
  2. If the KDC does not have an entry for the requested service in its SPN database, then the KDC may not be able to provide the requested service.
  3. If the KDC does have an entry for the requested service in its SPN database, then the KDC may be able to provide the requested service, but the service may not be registered with the KDC.
  4. If the KDC is not able to provide the requested service, then the KDC may return an error code of 0x7 kdc_err_s_principal_unknown.

3. Check that the KDC has a record of the requested principal

  1. Verify that the KDC is configured to bind to the requested principal.
  2. Verify the KDC has a copy of the requested principal's certificate.
  3. Verify the KDC has a record of the requested principal in its registry.

4. Check that the KDC is reachable from the client

The steps to check that the KDC is reachable from the client in order to fix error code 0x7 kdc_err_s_principal_unknown are as follows:

  1. Verify that the KDC is reachable using the Net Bonjour service.
  2. Check the Windows DNS cache.
  3. Verify that the KDC is accessible using the following cmdlet: net user kdc /domain:<domain> /password
  4. If the KDC is not accessible, then the problem may lie with the client, the KDC, or the network.

5. Check that the client has a valid ticket for the KDC

  1. On the client machine, open a command prompt and change to the directory where you saved the kdc.pfx file.
  2. Type the following command to import the kdc.pfx file: kdcimport -file kdc.pfx
  3. If the kdc.pfx file is valid, you will see a message similar to the following: The client has a valid ticket for the KDC. If the kdc.pfx file is not valid, you will see a message similar to the following: The client does not have a valid ticket for the KDC. To fix this error, you will need to obtain a valid ticket for the KDC.

If the answers above didn't work then you should also try:

  1. Check that the client has a valid ticket for the requested service.
  2. Check that the client has the correct permissions for the requested service.