Fix Kerberos KRB_AP_ERR_SKEW (event 4771 failure code 0x25, Clock skew too great): the 5-minute tolerance, how Windows time flows from the PDC emulator, the w32tm commands to check and resync, and safe settings for DCs and VMs.
Home › Guides › Kerberos clock skew (KRB_AP_ERR_SKEW)
Last updated 18 November 2026
w32tm /resync /computer:<Target> /rediscover, then try to authenticate again.w32tm /query /source). Domain members should follow the domain hierarchy (NT5DS), DCs follow the PDC emulator, and only the forest root PDC emulator should use an external or hardware source.| Where | What it shows |
|---|---|
| Security log on a DC, event 4771 (Kerberos pre-authentication failed) | Failure Code 0x25, KRB_AP_ERR_SKEW, Clock skew too great. 4771 is generated only on domain controllers; Client Address shows where the request came from. |
| System log on the client or server, Kerberos event 4 | Microsoft's troubleshooting table lists "Event ID 4, Error KERB_AP_ERR_SKEW" and points to clock synchronization. |
| Network trace | KRB_AP_ERR_SKEW: "The client and target server clocks are out of sync." |
Two other codes from the 4771 table point the same way. 0x21 KRB_AP_ERR_TKT_NYV (Ticket not yet valid): the archived Windows Server 2003 page says "The most probable cause is that the clocks on the KDC and the client are not synchronized." The same page names 0xB KDC_ERR_NEVER_VALID (Requested start time is later than end time) as caused by mismatched KDC and client time. For the other 4771 codes see event 4625 status codes, and look up 4771 and 4616 (system time was changed) in the Windows Event ID Lookup.
Not always. The archived Windows Server 2003 page explains that a 0x25 "will not prevent a user from being authenticated": with the error, the domain controller supplies its own time, and the Kerberos client uses it to try again, so a user with valid credentials gets in on the second try. It adds that the error "can more commonly occur as the number of portable, or frequently disconnected, computers in your network increases." A steady stream from one machine, or failures users notice, means its clock or time source is wrong.
Microsoft's current guidance says Windows can usually resynchronize clocks automatically, and you have to act in two cases:
From Microsoft's Windows Time article (KB 816042):
The registry Type value says which sources a computer accepts: NT5DS (domain hierarchy, the default on domain members), NTP (the servers in NtpServer, the default on stand-alone computers), NoSync or AllSync. W32Time uses UDP port 123 for all synchronization, so firewall rules between clients and DCs must allow it; work out the source ranges for those rules with the IPv4 Subnet Calculator or IPv6 Subnet Calculator.
w32tm /query /source w32tm /query /status /verbose w32tm /query /configuration w32tm /query /peers
/source shows the time source, /status the W32Time status, /configuration the runtime configuration and where each setting came from, and /peers the peers and their status. Add /computer:<target> to query another machine (Microsoft's example: w32tm /query /computer:contosoW1 /configuration).
To measure the offset against a DC, /stripchart prints the NTP offset between this computer and another one (default sample period 2 seconds; /samples stops after that many):
w32tm /stripchart /computer:DC01.contoso.com /samples:5 /dataonly
w32tm /monitor (optionally /domain:<domain name> or /computers:<name>,<name>) checks W32Time across the domain's computers.
If a member was pointed at a manual source, Microsoft's command to return it to the domain hierarchy is:
w32tm /config /syncfromflags:domhier /update net stop w32time net start w32time
Then resync and rediscover sources:
w32tm /resync /rediscover
/resync tells the computer to resynchronize as soon as possible, throwing out accumulated error statistics; /rediscover redetects the network configuration and time sources first. If Group Policy sets NtpServer through the Configure Windows NTP Client policy, W32Time ignores the registry value, so check the effective settings with w32tm /query /configuration.
Run (Get-ADDomain).PDCEmulator in the forest root domain to find it (the same command the lockout guide uses). Microsoft's KB 816042 configures it in the registry:
| Key under HKLM\SYSTEM\CurrentControlSet\Services\W32Time | Value | Set to |
|---|---|---|
| Parameters | Type | NTP |
| Config | AnnounceFlags | 5 (0xA if the link to the upstream server is unreliable or you use SpecialPollInterval, per Microsoft's notes) |
| TimeProviders\NtpServer | Enabled | 1 |
| Parameters | NtpServer | Space-delimited list of peers, each ending in ,0x1 |
| Config | MaxPosPhaseCorrection / MaxNegPhaseCorrection | A reasonable value in seconds, such as 3600 (1 hour) or 1800 (30 minutes) |
Then net stop w32time && net start w32time. The w32tm reference shows the command-line form for setting peers (its example names):
w32tm /config /manualpeerlist:"ntpserver.contoso.com clock.adatum.com" /syncfromflags:manual /update
Since Windows Server 2016 Microsoft recommends three or more time servers. With only two, flag one with UseAsFallbackOnly (0x2): w32tm /config /manualpeerlist:"ntpserver.contoso.com,0x8 clock.adatum.com,0x2" /syncfromflags:manual /update. /reliable:YES marks a computer as a reliable time source and is only meaningful on domain controllers.
| Setting | Domain members | Domain controllers | Stand-alone |
|---|---|---|---|
| MaxPosPhaseCorrection / MaxNegPhaseCorrection (seconds) | 0xFFFFFFFF (always correct) | 172,800 (48 hours) | 54,000 (15 hours) |
MaxAllowedPhaseOffset defaults to 300 seconds for domain members and 1 second for stand-alone clients and servers.
If a correction larger than MaxPos/MaxNegPhaseCorrection is needed, the service logs an event instead of changing the clock. Below MaxAllowedPhaseOffset W32Time adjusts the clock gradually through the clock rate; above it, it sets the clock immediately. That is why a DC that is more than 48 hours out won't fix itself: correct it by hand, then find out why it jumped. A DC whose clock jumps a tombstone lifetime or more can stop replicating with AD replication error 8614.
Microsoft recommends disabling time synchronization between the host and a guest that is a domain controller, so the DC synchronizes with the domain hierarchy instead. In Hyper-V: turn the VM off, open its settings, select Integration Services and clear Time synchronization. The replication error 8614 article likewise asks whether virtual hosts and guests source time according to the hosting manufacturer's recommendations. Not sure whether a drifting machine is a VM? The MAC Vendor Lookup shows whether its adapter address (from ipconfig /all) belongs to a virtualization vendor.
The tolerance is the Kerberos policy Maximum tolerance for computer clock synchronization (Computer Configuration\Windows Settings\Security Settings\Account Policies\Kerberos Policy). It accepts 1 to 99,999 minutes; the Default Domain Policy sets 5 minutes and Microsoft advises keeping 5. Kerberos uses time stamps to prevent replay attacks, and the archived 2003 page warns: "the higher you set this value, the more susceptible the network becomes to replay attacks." There is also a client-side SkewTime value (REG_DWORD, default 5 minutes) under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\Kerberos\Parameters; Microsoft notes it also affects ticket reuse: a ticket is considered expired if its expiration time is less than the current time plus SkewTime.
The PowerShell Cheat Sheet has w32tm /query /status with other Windows one-liners; pull offsets out of saved /stripchart output with the Regex Tester.
Look up 4771, 4616 and Time-Service events in the Windows Event ID Lookup, find w32tm /query /status and the Active Directory cmdlets in the PowerShell Cheat Sheet and parse saved w32tm output with the Regex Tester. Related guides: KRB_AP_ERR_MODIFIED, AD replication error 8614 and event 4625 status codes.
It is Kerberos error 0x25, Clock skew too great: the time on the client and the domain controller or target server differs by more than the allowed tolerance. Microsoft says the difference must be less than five minutes.
Five minutes. The Maximum tolerance for computer clock synchronization policy accepts 1 to 99,999 minutes, the Default Domain Policy sets 5, and Microsoft advises keeping it at 5 because a larger value makes replay attacks easier.
Resynchronize the clock with w32tm /resync /computer:
Not necessarily. Microsoft's archived Windows Server 2003 page explains that the domain controller returns its own time with the error and the client retries with it, so a user with valid credentials is authenticated on the second try. Repeated errors from one machine point to a bad clock or time source.
Microsoft recommends disabling host time synchronization for DC guests so they sync with the domain hierarchy instead. Turn the VM off, open its settings, select Integration Services and clear Time synchronization.
Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.