In an Active Directory domain, Kerberos refuses a sign-in request when the two clocks involved differ by more than the permitted clock skew, five minutes by default. Check the affected server with the Windows w32tm tool: read its time source and offset (read-only), then compare it with a healthy domain controller. If the offset is anywhere near 300 seconds, or the server is taking its time from something other than the domain hierarchy, fix the source rather than widening the tolerance. Then resynchronise and retry the failing sign-in.
Why a wrong clock stops people signing in
In an Active Directory domain, sign-in is handled by Kerberos. Every Kerberos request carries a timestamp, and the receiving side compares it with its own clock. That is how Kerberos stops someone capturing a valid login and replaying it later. If the two clocks differ by more than the permitted clock skew, the request is refused. The default allowance is five minutes.
The result rarely looks like a time problem. People are prompted repeatedly for a password that is correct, a file share or remote desktop connection refuses a server that worked before, or a service account stops authenticating. The awkward clocks are the ones out by six minutes: wrong enough to break sign-in, close enough to look right at a glance.
Servers usually drift for one of a handful of reasons:
A wrong time zone is a different matter. NTP works in UTC, so a server that shows 2pm instead of 3pm because of its time zone setting has not necessarily drifted at all. Judge by the measured offset described below, not by what the taskbar shows.
- A member server has been pointed at its own manual time source instead of following the domain controllers. Microsoft notes that the two can then disagree, causing Kerberos to fail, with knock-on effects for things like printing and file sharing.
- A virtual machine takes its time from the hypervisor host, and either the host clock is wrong or the host competes with the domain's own time source.
- The domain controller at the top of the time hierarchy (the PDC emulator in the forest root) has no reliable external source and is trusting its own hardware clock.
- Time requests never arrive: UDP port 123 is blocked, or the name of the time server does not resolve.
Before you begin
This article is aimed at Windows Server machines joined to an Active Directory domain, which is where the five-minute Kerberos rule bites hardest. A server outside a domain uses a manually configured source (by default time.windows.com), so the measuring steps still apply but the fixes that put a server back on the domain hierarchy do not.
- Local Administrators membership on the affected server, because the w32tm tool needs it. Running w32tm against other computers needs Domain Admins.
- The name of one healthy domain controller to compare against.
- Everything in the measuring sections is read-only. The corrections further down change time settings or move the clock, and say so where they do.
Confirm the sign-in failures point at time
Clock skew leaves a recognisable fingerprint on a domain controller, provided failure auditing is switched on for the Audit Kerberos Authentication Service subcategory. Event 4771 (Kerberos pre-authentication failed) records a failure code, and 0x25 is KRB_AP_ERR_SKEW: clock skew too great.
One skew entry does not prove a clock is behind your outage, which is why the next section measures. Equally, no 4771 events does not clear time: auditing may be off, or the error may only surface on the client or application as a clock skew message.
- On a domain controller, open Event Viewer and go to Windows Logs, then Security.
- Select Filter Current Log and enter 4771 as the event ID. Look at events around the time of a failed sign-in.
- Open an event and read the Failure Code. 0x25 means clock skew. 0x18 means the pre-authentication information was invalid, usually a wrong password, which is a different problem altogether.
Measure how far out the server is
Run these on the affected server in a Command Prompt opened as administrator. None of them changes anything. Together they tell you where the clock gets its time, how it is configured and how far it sits from a domain controller.
- Check the status and source. In the output, read Source (where this clock gets its time), Last Successful Sync Time (it should be recent), Phase Offset (the gap between this clock and that source) and Stratum.
w32tm /query /status - Record the configuration. Note the Type value: NT5DS means the server follows the domain hierarchy, while NTP means it uses a manual peer list. Note NtpServer too, and whether each setting comes from Group Policy or the local registry. Save the output, because it is your way back if you change anything later.
w32tm /query /configuration - Compare the server with a domain controller. Replace YOUR_DC_NAME with a healthy domain controller. This takes five samples and prints the offset in seconds. Compare it with 300 seconds, the default Kerberos allowance, and be uneasy long before you reach it.
w32tm /stripchart /computer:YOUR_DC_NAME /samples:5 /dataonly - If you have Domain Admins rights, check every domain controller at once. This gives a quick status of each domain controller in the domain. One that is far from the others is your lead.
w32tm /monitor - Find the PDC emulator and ask what it follows. The first command needs the Active Directory PowerShell module, which a domain controller already has. Replace YOUR_PDC_EMULATOR_NAME with the result. In a multi-domain forest, the one that matters for external time is the PDC emulator of the forest root domain.
Get-ADDomain | Select-Object PDCEmulatorw32tm /query /computer:YOUR_PDC_EMULATOR_NAME /source
Match what you see to the likely cause
Read the results as a chain: member server, then its domain controller, then the PDC emulator, then whatever the PDC emulator trusts. The fault is usually at the first link whose source is wrong.
Resist the temptation to raise the Kerberos tolerance. The Maximum tolerance for computer clock synchronization policy (under Account Policies, Kerberos Policy) is a domain-wide setting, and Microsoft's recommended value is the five-minute default. Widening it silences the symptom while the drift carries on, and it loosens a replay protection for every account in the domain.
- Source is a domain controller, the last sync is recent and the offset is near zero: time is probably not your problem, and this article has nothing more to offer you.
- Offset is large but Source names a domain controller: that domain controller is out. Run the same checks on it and move up the chain.
- Type is NTP with a manual NtpServer on a domain member: the server is following something other than its domain controllers. If Group Policy sets this, the policy is what needs correcting.
- Source reads as the VM IC Time Synchronization Provider: the guest is taking time from its hypervisor host. Check that host's clock first.
- The PDC emulator's source is its own hardware clock or a VM time provider: the whole domain is inheriting whatever that clock says. See the final section.
- Last Successful Sync Time is old, or the System log shows Windows Time events 129 or 134: the server cannot find or reach its time source.
Put a drifting member server back on the domain hierarchy
Use this when the measuring steps showed a domain member with a manual peer list and healthy domain controllers. It changes where this one server takes its time and restarts the time service on it.
If Group Policy configures the Windows Time Service (Computer Configuration, Administrative Templates, System, Windows Time Service), policy values overwrite the local registry, so a local change will not stick. Correct the policy instead.
- In an elevated Command Prompt on the server, switch it to follow the domain hierarchy and restart the time service.
w32tm /config /syncfromflags:domhier /update net stop w32time net start w32time - If you need to go back, reapply the manual settings you saved earlier. Replace YOUR_TIME_SERVER_NAME with the value you recorded and run this only on a server that is meant to use a manual source.
w32tm /config /manualpeerlist:"YOUR_TIME_SERVER_NAME" /syncfromflags:manual /update
Stop a virtual machine borrowing the wrong clock
Virtual machines can take their time from the hypervisor, which is helpful for a stand-alone server and troublesome for anything following a domain. Microsoft's guidance for a virtualised domain controller is that if it takes time from its host and from its own source, the time can change frequently, and a jump can leave lingering objects behind and may stop replication. Its AskDS team recommends disabling the VMICTimeProvider (the Hyper-V time provider inside the guest) where you rely on an on-premises Active Directory time hierarchy, with the forest root PDC emulator getting time from an external source.
Do this only once the measuring steps show the guest can reach a healthy domain controller. Otherwise you are removing its only time source. The Hyper-V steps run on the host as a Hyper-V administrator, one VM at a time.
VMware works differently. Broadcom documents turning off VMware Tools periodic time sync when the guest runs its own time service, using the tools.syncTime setting in the .vmx file, the Tools toolbox option or a command inside the guest. Disabling periodic sync does not stop the one-off syncs Tools performs at events such as Tools startup, snapshot operations, resume and vMotion, so the ESXi host also needs accurate NTP. VMware's own advice is that a VM's start-up time derives from its host, so a bad host clock reaches guests when they power on or restart. This command, run in the guest from an elevated prompt in the VMware Tools folder (typically C:\Program Files\VMware\VMware Tools), turns periodic sync off. Use the enable form to reverse it.
vmtoolsd.exe timesync disable
vmtoolsd.exe timesync enable- On the Hyper-V host, list the VM's integration services. Replace YOUR_VM_NAME with the VM's name. Time Synchronization is on by default for Windows guests.
Get-VMIntegrationService -VMName "YOUR_VM_NAME" - Turn off the Time Synchronization integration service for that VM. It affects only this VM. To undo it later, run the second command instead.
Disable-VMIntegrationService -VMName "YOUR_VM_NAME" -Name "Time Synchronization"Enable-VMIntegrationService -VMName "YOUR_VM_NAME" -Name "Time Synchronization" - Inside the guest, restart the time service and re-read the source. It should no longer say VM IC Time Synchronization Provider and should name a domain controller. If it still reports the Hyper-V provider, the AskDS post describes a guest-side registry alternative for disabling it.
net stop w32time net start w32timew32tm /query /source
Check that it worked
The aim is a server whose source is the domain hierarchy, whose offset is close to zero and whose sign-ins succeed again.
- Ask the server to resynchronise now. Run it in an elevated Command Prompt; the command waits until the resync finishes. This is the step that can move the clock. If the offset is larger than the service's allowed phase offset (300 seconds by default on domain members), the clock is set directly rather than adjusted gradually, so log timestamps and scheduled work may jump. Note the time you run it. On a domain controller the service does not correct beyond 48 hours by default and logs an event instead. If that is your situation, stop and get specialist help.
w32tm /resync - Read the status again. Source should name a domain controller, Last Successful Sync Time should be moments ago and Phase Offset should be nowhere near 300 seconds.
w32tm /query /status - Repeat the stripchart comparison from earlier. The offset against your healthy domain controller should now be tiny.
- Retry the sign-in or connection that was failing. On a domain controller, no new 4771 events with failure code 0x25 should appear after the time of your fix, and the server's System log should stop adding new Windows Time warnings.
If it still isn't right, or it is time to hand it over
Stop and bring in specialist help if a domain controller is out by days, if you see replication warnings alongside the time errors, or if the PDC emulator itself needs a new source. Changes at the top of the hierarchy spread to everything beneath it.
Once things are healthy, a failed sync should not go unnoticed. The NCSC's joint guidance on forensics and protective monitoring says systems should run NTP from reputable and redundant sources and alert loudly when NTP fails. The remaining blockers usually fall into a few groups:
- The time source never answers. Microsoft lists three causes: the name does not resolve or is misspelt in the NtpServer setting, UDP port 123 is blocked by Windows Firewall or another firewall, or the target is not advertising as a time server. For a domain controller source, this read-only check shows whether it advertises itself properly. Run it on that domain controller.
dcdiag /test:Advertising - The domain controllers disagree with each other. Work from the PDC emulator downwards and look for the first one whose source is wrong, using the measuring steps above.
- A non-Windows server or appliance sits in the domain. Kerberos is not Windows-specific, so storage systems, firewalls and Linux hosts that authenticate against Active Directory need the same reliable time sources as everything else.
- The PDC emulator at the root of the forest follows its own clock or a VM provider. Microsoft's guidance is that this one domain controller should take time from an external source and everything else follows it. List three or more sources when you set them manually. Run this only on that domain controller, after saving its current configuration with the earlier configuration query. To undo it, reapply the saved values. Treat it as a planned change, not a quick fix.
w32tm /config /manualpeerlist:"YOUR_TIME_SERVER_1 YOUR_TIME_SERVER_2 YOUR_TIME_SERVER_3" /syncfromflags:manual /update
Technical terms explained
- clock skew
- The difference between two computers' clocks. Kerberos refuses requests when the difference exceeds its tolerance, which is five minutes by default.
- domain controller
- A server that holds Active Directory and handles sign-in requests for a domain.
- domain hierarchy
- The chain Windows uses by default for time: member servers take time from domain controllers, which take it from the PDC emulator.
- integration service
- A Hyper-V feature that lets the host and a VM exchange information. The Time Synchronization one sets the VM's clock from the host.
- Kerberos
- The authentication protocol Active Directory uses for sign-in. It relies on timestamps in its requests to prevent captured logins being replayed.
- NTP
- Network Time Protocol, the standard way computers fetch accurate time from another system over the network. It works in UTC.
- PDC emulator
- A domain controller role. In the forest root domain it sits at the top of the Windows time hierarchy, so its accuracy matters for every other server.
- UDP port 123
- The network port NTP uses. If a firewall blocks it, a server cannot reach its time source.
Sources and further reading
- Microsoft Learn: Windows Time Service Tools and Settings
- Microsoft Learn: How the Windows Time Service Works
- Microsoft Learn (archive): Maximum tolerance for computer clock synchronization
- Microsoft Learn (archive): Event 4771 Kerberos pre-authentication failed
- Microsoft Learn: w32tm /resync fails with no time data available
- Microsoft Learn: Windows Time Service event IDs 24, 29 and 38 on a virtualized domain controller
- Microsoft Learn: Manage Hyper-V Integration Services
- Microsoft Tech Community (AskDS): Synchronizing time on virtualized AD DS environments
- Microsoft Tech Community (AskDS): Kerberos errors in network captures
- Broadcom KB 315346: Timekeeping best practices for Windows, including NTP
- VMware blog: Ensuring accurate time keeping in virtualized Active Directory infrastructure
- NCSC: Guidance on digital forensics and protective monitoring specifications for producers of network devices and appliances