Understanding Active Directory: The Technology Behind Enterprise AI Security - Part 6: Common Problems and Solutions

Understanding Active Directory: The Technology Behind Enterprise AI Security - Part 6: Common Problems and Solutions

In Part 5, we examined browser authentication settings and how to verify them. This installment explains how to investigate authentication and domain-join failures.

A slow file share or a failed join despite working name resolution does not identify a single cause. Record the initial state, then separate naming, time, service credentials, permissions and network connectivity.

The focus is Windows clients and AD DS. The comics are fictional teaching dialogues. Commands use illustrative names and are diagnostic examples, not results from an AD environment tested for this article. Appropriate device and directory read permissions are required; some commands need an elevated shell.

Series overview

6.1 Diagnose authentication failures

6.1.1 Distinguish slowness from NTLM fallback

Slowness does not identify an authentication method. Dialogue follows the image.
Slowness does not identify an authentication method
  • Developer「Is NTLM making the share slow?」
  • Trainer「Slowness alone cannot tell us the method.」
  • Trainer「Compare tickets and logs at the same time.」
  • Developer「I will narrow the cause using evidence.」

Slowness does not prove NTLM use, and NTLM use does not prove a failed Kerberos attempt. An application may select NTLM from the start. First record the client, user, target name, operation and time.

EvidenceWhat it tells you and its limits
Client ticketsTickets in the current logon session, not necessarily another user or service session
Target authentication logsThe method and outcome accepted by that service, subject to its logging configuration
DC logsTicket requests and failures, where the required auditing is enabled
Traffic and timingWhether the delay is in name resolution, connection, authentication or data transfer

On Windows, klist displays tickets for the current session. The second command below requests a ticket for an illustrative file-server SPN. Save the initial display before trying the request in an authorized test environment.

klist
klist get cifs/files01.ad.example.com

Obtaining a ticket does not prove that the application used Kerberos for the share access. Nor does an empty cache in the current session establish a service-wide fault. Correlate the target and DC records for the same time window.

For a suspected encryption mismatch, compare supported types, available account keys and effective policies across the client, service account and DC. Do not start by re-enabling an older type. Plan software and key updates with the administrator. Purging tickets can affect active connections, so do not discard that evidence first.

Sources

6.1.2 Check clock skew and time sources

Check the clock and its time source. Dialogue follows the image.
Check the clock and its time source
  • Developer「Can clock skew affect authentication?」
  • Trainer「Yes. Check the offset and time source.」
  • Trainer「Trace the source upstream, beyond the client.」
  • Developer「I will record the state before changing it.」

Kerberos uses time when validating requests. The Windows clock-tolerance policy defaults to five minutes, but check the effective setting. A generic logon error alone does not establish clock skew as its cause.

These commands inspect Windows Time status, its source and effective configuration, then take five offset samples against a selected DC. Substitute the actual target name.

w32tm /query /source
w32tm /query /status
w32tm /query /configuration
w32tm /stripchart /computer:dc01.ad.example.com /samples:5 /dataonly
The basic domain time hierarchy.Trusted time sourceSelected by organizational policyForest-root PDC emulatorVerify the upstream sourceDomain hierarchyTrace sources through DCsto member devices
The basic domain time hierarchy. Diagram by Qualiteg.

Domain members normally use the domain hierarchy, with the PDC emulator in the forest-root domain at its upstream boundary. Verify roles and configuration before redirecting every member to an external NTP source or pinning every DC to one machine.

ObservationNext check
Offset is large or keeps growingEffective source, last successful sync and Windows Time events
No stripchart responseName resolution and the UDP 123 path; there can be several causes
Only a VM driftsHost time and time providers, using the virtualization platform guidance
A large correction is rejectedEffective MaxPosPhaseCorrection / MaxNegPhaseCorrection values and machine role

Stripchart and the Windows Time service use different UDP source-port behavior. A successful stripchart test does not by itself prove service synchronization. Avoid blanket advice to disable host time integration or a universal 48-hour correction rule. Have the owner assess impact and rollback, then verify synchronization after the change.

Sources

6.1.3 Match SPN ownership to the actual service

Match the service name to the key owner. Dialogue follows the image.
Match the service name to the key owner
  • Developer「Two accounts have the same SPN.」
  • Trainer「Find the account whose key is actually used.」
  • Trainer「Compare the service settings and registrations.」
  • Developer「I should not guess which entry to delete.」

An SPN identifies a target service for Kerberos. Its presence alone is insufficient. It must correspond to the account whose key is used to process the service ticket.

The following queries search a forest for an illustrative web-service SPN, inspect duplicates and list a candidate account. A forest-wide duplicate search can take time, so start with the specific SPN. Use an administrative workstation with directory read access.

setspn -F -Q HTTP/web.ad.example.com
setspn -F -X
setspn -L AD\web_svc
FindingInterpretation
No matching entryCheck the requested name, service class, aliases and applicable HOST mappings
Entries on multiple accountsIdentify the credential actually used before reconciling ownership
One entry, but authentication failsCheck the registered owner, keys, service configuration, tickets and logs
An IIS application-pool identity changedCheck kernel-mode settings and useAppPoolCredentials, not only the pool identity

A computer account’s HOST SPN can cover common service classes such as HTTP and CIFS. Do not immediately add an entry merely because an explicit HTTP line is absent. IIS kernel-mode authentication normally uses machine credentials; choosing a custom pool identity alone does not settle the correct SPN owner.

If a registration change is justified, the owner should preserve the original entries and rollback plan. Use the duplicate-checking setspn -S for additions rather than blindly applying -A. Remove an entry only after confirming that ownership is incorrect. There is no need to embed a service-account password in a plaintext command.

Sources

6.1.4 Separate DNS answers, search names and caches

Separate name resolution from authentication. Dialogue follows the image.
Separate name resolution from authentication
  • Developer「If DNS works, is authentication fine?」
  • Trainer「Those are separate checks.」
  • Trainer「Compare DNS answers with the client cache.」
  • Developer「One successful check does not prove everything.」

AD uses DNS to locate domain controllers and other targets, but successful resolution is distinct from successful authentication. Record the DNS server in use, the queried name and the returned addresses.

ipconfig /all
nslookup files01.ad.example.com
ipconfig /displaydns
InformationRole and limitations
Short name and DNS suffixesName expansion; the primary suffix, connection suffix and search list are distinct
A / AAAA and aliasesIPv4 / IPv6 addresses and CNAME relationships; also verify the authentication service name
PTR reverse lookupMaps an address to a name; a missing PTR alone does not establish a Kerberos failure
Client cacheMay differ from a DNS server answer; applications can also retain state
Conditional forwarderDirects queries for a domain; it does not create routes or an AD trust

If only a short name fails, compare its result with the FQDN and inspect search configuration. DHCP Option 015 relates to the connection-specific domain name; it is not itself a multi-entry suffix search list. An empty field alone is not a diagnosis of an authentication fault.

If stale data is suspected, preserve the client’s view and a direct query to the relevant DNS server. If justified, use ipconfig /flushdns to clear the Windows DNS client resolver cache, then repeat the operation. This does not simultaneously repair server-side caches, application caches or the hosts file.

Sources

6.2 Diagnose domain-join failures

6.2.1 Check DC discovery and the join log

Finding a DC is only the first step. Dialogue follows the image.
Finding a DC is only the first step
  • Developer「Ping works, but the domain join fails.」
  • Trainer「Ping does not test every required connection.」
  • Trainer「Check DNS, DC discovery and the join log.」
  • Developer「I will inspect paths without disabling defenses.」

A “domain not found” message can have several causes, including an incorrect name, DNS or DC reachability. A private IP address does not prove a healthy configuration, and using a router as a resolver is not automatically wrong. Verify that the configured DNS path can resolve the AD records.

The illustrative domain is ad.example.com. Also verify resolution and reachability of the DC names returned in SRV answers. An nltest result is evidence about DC discovery, not proof that every join operation succeeds.

nslookup -type=SRV _ldap._tcp.dc._msdcs.ad.example.com
nltest /dsgetdc:ad.example.com /force

The following examples test TCP connections to one DC. Test-NetConnection with Port tests TCP, not UDP or the authentication exchange. Ping likewise tests ICMP reachability only.

Test-NetConnection -ComputerName dc01.ad.example.com -Port 88
Test-NetConnection -ComputerName dc01.ad.example.com -Port 389
Test-NetConnection -ComputerName dc01.ad.example.com -Port 445
Test-NetConnection -ComputerName dc01.ad.example.com -Port 135
PurposeExample traffic to verify
DNS, authentication and discoveryDNS TCP/UDP 53, Kerberos TCP/UDP 88 and LDAP TCP/UDP 389
SMB and RPCTCP 445, TCP 135 and required dynamic RPC ports; current Windows Server defaults use 49152–65535; verify the effective configuration
Additional functionsPassword changes, time synchronization, LDAPS and GC services as required by the configuration

This is not a list to open indiscriminately. Reaching RPC Endpoint Mapper on port 135 does not prove access to the assigned dynamic port. Identify source, destination and direction, then compare the official requirements with firewall logs. Do not disable every firewall profile as a diagnostic shortcut.

Windows records join details in %windir%\debug\NetSetup.log on the joining device. The following reads its tail. Preserve the timestamp and actual status code, and review or redact account names and internal identifiers before sharing it publicly.

Get-Content -LiteralPath "$env:windir\debug\NetSetup.log" -Tail 80
Sources

6.2.2 Separate credentials, delegated rights and account reuse

Identity and join permissions are different. Dialogue follows the image.
Identity and join permissions are different
  • Developer「Must I use a top-level administrator?」
  • Trainer「Delegate only the permissions needed.」
  • Trainer「For an existing computer, check ownership too.」
  • Developer「I will diagnose the failure before adding rights.」

A domain join does not inherently require Domain Admins or Enterprise Admins every time. Required permissions can be delegated for the target OU. Identify the target domain, join identity, destination OU and whether the computer account is new or being reused.

Use an assigned domain-qualified identity such as AD\join_operator or its actual UPN. A UPN suffix need not equal the DNS domain name. An account is not unsuitable merely because it is an ordinary user; delegated permissions and policy determine what it can do.

Failure classWhat to inspect
Identity validationCorrect domain, identity and credentials, expiry, lockout and disabled state
Object creation or update deniedDelegated rights on the target OU and computer object
Existing computer reuse blockedOwnership and the reuse policy under current KB5020276 guidance
DC cannot be locatedDNS and connectivity rather than assuming a password error

This read-only example requires the RSAT ActiveDirectory module and directory read access on an administrative workstation. The account name is illustrative.

Get-ADUser -Identity 'join_operator' -Properties Enabled,LockedOut,AccountExpirationDate,PasswordExpired |
    Select-Object SamAccountName,Enabled,LockedOut,AccountExpirationDate,PasswordExpired

Disabled state and lockout are different. Enabling an account is not the same as unlocking it. Even when an unlock is justified, investigate devices or tasks repeatedly submitting old credentials. Do not make passwords non-expiring for the join or place plaintext passwords in command history.

Reusing an existing computer account involves hardened ownership checks in addition to join permissions. Do not simply delete the object as a workaround. Have the administrator review ownership, trusted-owner scope and update state against KB5020276. Avoid expanding the policy to broad groups.

Sources

6.2.3 Keep web, AD, IPv4 and IPv6 paths distinct

A working website does not prove the AD path. Dialogue follows the image.
A working website does not prove the AD path
  • Developer「Web access works, so is the network fine?」
  • Trainer「Web and AD traffic can take different paths.」
  • Trainer「Check targets, names and permitted traffic.」
  • Developer「I will change one thing and compare results.」

A working website does not prove a working domain-join path. The client and DC need not share a subnet. Routing across VLANs, DNS and the required traffic and responses must work as designed.

WinHTTP proxy settings apply to HTTP applications using WinHTTP. They do not, by themselves, redirect native LDAP, Kerberos, SMB and RPC traffic through an HTTP proxy. A working browser alongside a failed join is not a reason to reset WinHTTP settings immediately.

Do not disable IPv6 whenever a fault occurs. Microsoft does not recommend disabling or unbinding IPv6 in Windows. Inspect A/AAAA records, the selected destination and the actual route. Changes such as preferring IPv4 require evidence and an impact review by the owner.

Narrow the failing condition before widening settings.RecordTime, identity, targetand the actual errorIsolateNames, time, keys, rightsand network connectivityVerify one changeCompare before and after;check intended denials too
Narrow the failing condition before widening settings. Diagram by Qualiteg.
  1. 1Record the failing operation and a comparable working case under consistent conditions.
  2. 2Check DNS, DC discovery and required traffic, separating connectivity from authentication.
  3. 3Compare time, SPNs, service configuration, join rights and ownership.
  4. 4Make a small, justified change and retest the operation and intended denials.
  5. 5If unresolved, give the owner timestamps, logs, configuration differences and attempted steps.

Do not stop at “it works when a protection is turned off.” Confirm the failure and its resolution with required controls in place. Keep observed facts separate from hypotheses so another owner can continue the investigation.

Sources

Next, turn working access into secure operation

Part 7 examines authentication methods, administrative privileges, auditing and operations. Working connectivity and secure operation need separate verification.

Qualiteg Technology Consulting

Company-wide AI security you can consult on, from foundations to operations.

From foundations such as identity and access management to LLM-specific risks (prompt injection, data leakage, harmful output) — using AI safely across an organization involves a wide range of concerns.

We develop and offer our own LLM auditing product, "LLM-Audit". Drawing on that expertise, we provide hands-on support from audits and assessments to defensive measures and secure operational design.

Explore our LLM security services →

Read more