“I can’t log in” is one of the most common tickets an admin gets. To fix it quickly you need to know who’s involved in a logon and in what order. This guide covers a local logon, a domain logon with Kerberos, and the tools that show you where it went wrong.
The players
| Component | Job |
|---|---|
Winlogon (winlogon.exe) |
Manages the logon session; reacts to Ctrl+Alt+Del |
| LogonUI + credential providers | Draw the sign-in screen and collect the password, PIN or smart card |
LSASS (lsass.exe) |
Checks the credentials, using an authentication package |
| Authentication packages | Kerberos for domain logons; MSV1_0 (NTLM) for local accounts and fallback |
| SAM | The local account database on every machine |
| Domain controller (KDC) | Checks domain accounts and issues Kerberos tickets |
A local logon
- You press Ctrl+Alt+Del and enter
SRV01\localadminand a password. - LSASS passes it to MSV1_0, which compares a hash of the password with the one stored in the SAM.
- If it matches, LSASS builds an access token: your user SID, your group SIDs (like Administrators) and your privileges.
- Winlogon loads your profile and starts
userinit.exe, which starts the shell (explorer.exe).
Every program you then start gets a copy of that token – which is why group changes need a new logon to take effect.
A domain logon with Kerberos
First the PC must find a domain controller – that’s the DC locator process. Then Kerberos does the rest:
- AS-REQ – the PC sends the user name and a timestamp encrypted with a key derived from the password (pre-authentication).
- AS-REP – if the DC can decrypt it, the password is right; it returns a Ticket-Granting Ticket (TGT).
- TGS-REQ – to use a service (first the PC itself, later a file server), the PC presents the TGT and asks for a ticket for that service’s SPN, e.g.
cifs/FS01.contoso.local. - TGS-REP – the DC returns a service ticket. Inside it is the PAC, the list of the user’s group memberships.
- AP-REQ – the PC presents the service ticket to the server.
- The server builds an access token from the PAC and checks permissions. The password never crosses the network.
After the tickets, Group Policy for the user applies, logon scripts run and the profile loads.
When the DC can’t be reached
Windows can log a domain user on with cached credentials – a protected copy of the last successful logons (10 by default). That’s why a laptop works off the network, and why a server with a broken network connection may still accept your logon but fail to reach anything.
When NTLM is used instead
Kerberos needs a name and an SPN. Windows falls back to NTLM when you connect by IP address, when the SPN is missing or duplicated, or when there’s no route to a DC. NTLM is older and weaker; many organisations audit or restrict it.
Read the events
| Event ID | Where | Meaning |
|---|---|---|
| 4624 | Target machine, Security log | Successful logon – check the Logon Type |
| 4625 | Target machine | Failed logon – see Status/Sub Status (e.g. 0xC000006A wrong password, 0xC0000234 locked out) |
| 4768 | DC | TGT requested (AS exchange) |
| 4769 | DC | Service ticket requested |
| 4771 | DC | Kerberos pre-authentication failed (usually a wrong password) |
| 4776 | DC or machine | NTLM credential validation |
Logon types in 4624/4625: 2 interactive (console), 3 network (file share), 4 batch (scheduled task), 5 service, 10 RemoteInteractive (RDP), 11 cached interactive.
# Failed logons on this server in the last day
Get-WinEvent -FilterHashtable @{LogName='Security'; Id=4625; StartTime=(Get-Date).AddDays(-1)} |
Select-Object TimeCreated, @{n='User';e={$_.Properties[5].Value}}, @{n='Status';e={'0x{0:X}' -f $_.Properties[7].Value}}
Commands for logon problems
whoami /groups # the groups in your current token
klist # your Kerberos tickets
klist purge # drop them (they're re-requested; or log off and on)
nltest /sc_query:contoso.local # is the secure channel to the domain OK?
Test-ComputerSecureChannel -Repair -Credential contoso\admin # fix "trust relationship failed"
setspn -X # find duplicate SPNs (they break Kerberos)
w32tm /query /status # check time sync
Common causes, fast
- Clock difference over 5 minutes → Kerberos fails (KRB_AP_ERR_SKEW). Fix time sync.
- “The trust relationship between this workstation and the primary domain failed” → the computer account password is out of sync; repair the secure channel.
- Group change not working → the user needs a new logon (or
klist purgefor network access). - Works by name, not by IP (or the reverse) → Kerberos vs NTLM; check SPNs and NTLM restrictions.
- Repeated lockouts → find the source with event 4740 on the PDC emulator.
What’s next
Next: DC locator – how clients find a domain controller.
Practise this topic
Test yourself with free questions on this topic – instant answers and explanations.
Start practice questionsWindows ServerActive DirectoryKerberosAuthenticationDeep DiveAdvanced