Bug in "Kerberos Configuration Manager for SQL Server", it does't work if AD's NETBIOS name contains hyphen

John Doe 25 Reputation points
2023-03-01T14:25:14.0933333+00:00

Hello,

I don't know any better way of reporting a bug to MS so here goes...Basically "Kerberos Configuration Manager for SQL Server" does not work if AD's NETBIOS name contains hyphen.

For example it does not work if domain's NETBIOS name is "TEST-AD" but it works if it is "TESTAD".

Error message you get is:

Error: Access of User Principal information failed System.DirectoryServices.AccountManagement.PrincipalServerDownException: The server could not be contacted. ---> System.DirectoryServices.Protocols.LdapException: The LDAP server is unavailable.

Based on what I looked the code with dnSpy there seems to be a problem with regex in line 291 in [KerberosCM.WMIHelper]

Screenshot below shows it working normally when NETBIOS name doesn't contain hyphen, it stays as DEMO

censored_1

Here you can see it failing when NETBIOS name is "XXXX-VIRHE", it becomes "VIRHE" in the regex

censored_2

Also, I think the same problem is somewhere else in the code too, if you manually edit the return value to match the correct domain the program seems to work but it reports your username in incorrect format in the GUI (i.e. TEST-AD\Admin would show up AD\ADMIN)

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,262 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Enrico Meinel 5 Reputation points
    2024-02-29T12:53:43.6866667+00:00

    Hey, as I stumbled also other this, I changed the regex in the il code with dnspy to get this working with hyphens. User's image

    Now I was able to execute the tool. Thanks :)

    1 person found this answer helpful.