I am using a Windows 10 machine which is unable to sync time automatically.
Clicking on "Sync now" on the Date & Time Settings produces an error "Time synchronization failed". The problem has been going on for a long time, as the last successful sync is shown to have happened 1 year ago.
The Time Service logs in Event Viewer are empty. Aside from that, Event Viewer contains no message connected to time synchronization.
In Services, the Windows Time service is set to "Manual (Trigger Start)" and its status is blank. When clicking on the service, everything is greyed out, so it cannot be started manually. (See screenshot below.)
Launching a command prompt as admin and trying to operate on the service via CLI produce the following errors:
C:\WINDOWS\system32>net stop w32time
The Windows Time service is not started.
More help is available by typing NET HELPMSG 3521.
C:\WINDOWS\system32>net start w32time
System error 5 has occurred.
Access is denied.
C:\WINDOWS\system32>w32tm /unregister
The following error occurred: Access is denied. (0x80070005)
C:\WINDOWS\system32>w32tm /register
The following error occurred: Access is denied. (0x80070005)
The Task Scheduler reports the same error 0x5 for task SynchronizeTime
. Details of tasks SynchronizeTime
and ForceSynchronizeTime
are all greyed out.
I have run DISM and SFC as suggested here, and it did not find any integrity violation:
C:\WINDOWS\system32>DISM.exe /Online /Cleanup-image /Restorehealth
Deployment Image Servicing and Management tool
Version: 10.0.18362.1
Image Version: 10.0.18362.657
[==========================100.0%==========================] The restore operation completed successfully.
The operation completed successfully.
C:\WINDOWS\system32>sfc /scannow
Beginning system scan. This process will take some time.
Beginning verification phase of system scan.
Verification 100% complete.
Windows Resource Protection did not find any integrity violations.
EDIT 1:
Here's the output of sc sdshow w32time
, converted via ConvertFrom-SddlString -Sddl "<output>"
:
Owner :
Group :
DiscretionaryAcl : {NT AUTHORITY\INTERACTIVE: AccessAllowed (CreateDirectories, GenericExecute, ListDirectory, Read,
ReadAttributes, ReadExtendedAttributes, ReadPermissions, WriteAttributes), NT AUTHORITY\SYSTEM:
AccessAllowed (ChangePermissions, CreateDirectories, Delete, DeleteSubdirectoriesAndFiles,
ExecuteKey, FullControl, GenericAll, GenericExecute, GenericRead, GenericWrite, ListDirectory,
Modify, Read, ReadAndExecute, ReadAttributes, ReadExtendedAttributes, ReadPermissions,
TakeOwnership, Traverse, Write, WriteAttributes, WriteData, WriteExtendedAttributes, WriteKey),
BUILTIN\Administrators: AccessAllowed (CreateDirectories, GenericExecute, ListDirectory, Read,
ReadAttributes, ReadExtendedAttributes, ReadPermissions, WriteAttributes)}
SystemAcl : {Everyone: SystemAudit FailedAccess (ChangePermissions, CreateDirectories, Delete,
DeleteSubdirectoriesAndFiles, ExecuteKey, FullControl, GenericAll, GenericExecute, GenericRead,
GenericWrite, ListDirectory, Modify, Read, ReadAndExecute, ReadAttributes, ReadExtendedAttributes,
ReadPermissions, TakeOwnership, Traverse, Write, WriteAttributes, WriteData,
WriteExtendedAttributes, WriteKey)}
RawDescriptor : System.Security.AccessControl.CommonSecurityDescriptor
EDIT 2:
I've tried to apply different permissions to the service (see @Robert's comment):
sc sdset w32time "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPLOCRRC;;;LS)(A;;CCSWWPLORC;;;LS)"
but it fails with this error:
[SC] OpenService FAILED 5:
Access is denied.
All the commands above were launched on a Command Prompt run as Administrator.
EDIT 3, 24/2/2021: One year after my post, the problem went mysteriously away by itself (somehow). Now the clock appears synchronized (last time sync marked coincides with the last boot). Manually trying to time sync by clicking on "Sync now" on the Date & Time Settings still produces an error "Time synchronization failed", but at least it automatically syncs, and that's good enough for me.
0.pool.ntp.org
for example?sc sdshow w32time
and the output can be converted in a powershell usingConvertFrom-SddlString -Sddl "<output of sc sdshow w32time>"
sc sdset w32time "D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;IU)(A;;CCLCSWLOCRRC;;;SU)(A;;CCLCSWRPLOCRRC;;;LS)(A;;CCSWWPLORC;;;LS)"
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time
itemImagePath
contains "C:\Windows\system32\svchost.exe -k LocalService". (3) Set Windows Time service to Startup of "Automatic (Delayed Start)", reboot, and wait a few minutes. (4) Try the solutions in this post. (5) If all fails, you might need to do a Repair Install.