Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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 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 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 at 19:43

1 Answer 1

up vote 1 down vote accepted

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).

share|improve this answer
    
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 at 21:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.