2

I have a Server 2012 R2 machine acting as a domain controller in a test environment.

It had to be restarted, and now, when attempting to log in as the domain administrator, I get the error message: there is a time and/or date difference between the client and server.

I first assumed that the BIOS battery might need to be replaced, so I restarted the computer and checked the date in the BIOS. The date was set to 4/26/2099.

I replaced the battery, set the date, and then tried to log into the server again. I got the same message, so I checked the date in the BIOS again and the date is again set to 4/26/2099.

I tried changing it again, but it keeps getting changed when Windows Server boots. I removed the hard drive and installed windows on another hard drive on this computer and it is keeping the time in the BIOS just fine, but when I put the hard drive with this Server 2012 DC into another computer, it does the same thing. The BIOS date gets set to 4/26/2099 and I am unable to log in.

I can attach the hard drive to a Hyper-V virtual machine and boot from there. I am able to log in with no errors and the date is set correctly.

What could be causing Server 2012 to set the BIOS clock?

3
  • Because as I stated above, (possibly not clearly enough) I installed windows on another drive on the same computer. The bios and windows time are correct and are not changed in this instance. I put the hard drive containing windows server into another computer and I get the same behavior. The bios clock is set to 2/26/2099 when booting from this hard drive containing windows server. That is two computers exhibiting the same behavior when booting from this hard drive. It definitely has something to do with the operating system.
    – esgeroth
    Feb 28, 2014 at 18:58
  • Windows can update the BIOS date/time. I never paid attention on Windows, but on Linux, you're asked if you want to change the BIOS time to UTC. See superuser.com/questions/185773/… which covers that in some ways. As for the date/time changing to 2099... are you running real or virtual machine here? Seems like VMs.
    – ETL
    Feb 28, 2014 at 19:35
  • This server was a virtual machine that was moved to a physical box. It had been running fine there for several days with no time/date issues until now.
    – esgeroth
    Feb 28, 2014 at 19:43

2 Answers 2

1

What could be causing Server 2012 to set the Bios clock?

Well, that's what it does. Linux does it too, but yes, your OS can and will set the real-time clock to match what it thinks the time is.

Regarding fixing this mess, what you need to do to correct the time on the server is login to the server with a local administrator account, and set the time to the proper time. Since it's a domain controller, you'll need to use the Directory Services Restore Mode to log in when domain authentication isn't working. Setting the clock properly should update the BIOS clock to the proper time, or close enough to allow you to log in with domain credentials.

Having said that, I'm honestly not sure I would. Seems like setting the clock back from such a big differential is likely to mess up the domain (which, in fact, is the very reason there's a maximum offset that will auto-correct in the first place), so I'd probably just treat this as a failed domain controller and purge it from Active Directory appropriately.

You should also consider setting your machines to sync to a reliable NTP time source, so this doesn't happen the next time a CMOS battery goes bad. You can, and should even do it by GPO - set your PDC emulator to sync with an external NTP source, and have all your domain computers sync from it (or sync up your domain controllers to the PDC emulator, and have machines sync from their local domain controller, depending on your network size).

1
  • I don't think there even was a battery failure. I only replaced it because that is what I first assumed would be the problem. In any case, I was able to boot the server into Directory Services Repair Mode. Once I logged in with the local administrator account I noticed that the time was already set correctly. I rebooted the server and I am now able to log in normally. This is just a test server so I had not set it to use an external time source, but I will do so now if it will prevent this type of problem in the future.
    – esgeroth
    Feb 28, 2014 at 21:23
1

This may have been an outdated post, but I just encountered and resolved a similar situation.

Environment: Windows Server 2012 Std, running as a standalone DC.

Background: after a scheduled power shutdown, services was down and unable to login (for domain administrator accounts).

Mis-info: Advice commonly found online = login as local admin. In this case, as its a DC, there's no local admin account at all.

Troubleshooting steps: We tried changing BIOS time, CMOS battery etc. No go.

Solution:

  1. Restart server in Safe Mode with Command Prompt

  2. at the Command prompt, type date and enter the date. Was showing 2098/1/1

  3. type time and enter the correct time.

  4. Not sure if these commands affect:

    a. w32tm /unregister

    b. w32tm /register

Once restarted, login page shows correct date/time and was able to successfully sign in.

1
  • Mis-info: Advice commonly found online = login as local admin. In this case, as its a DC, there's no local admin account at all. That's what the Directory Services Restore Mode (DSRM) is for. As stated in the accepted answer. It is the "local" Administrator account for a domain controller.
    – Greg Askew
    Feb 7, 2023 at 11:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .