Thursday, March 15, 2007

How to set up a Windows XP/2003 machine as a NTP Time Server.

These instructions will allow you to set up a Windows XP machine, and allow it to sync other computers, be they Windows or Linux, without the use of external time servers. I figured this one out while I was working in a lab that has a closed network, and each machine in the lab dual boots Red Hat Enterprise Linux WS4 and Windows XP SP2. There was a need to create a time server that would sync all systems.

Now, because the lab has a closed network, they could not all connect to a pre-existing time server, like most computers do. So, I had to create a time server, and while the time might not be correct, the important thing is not correctness with the outside world, but just within the network.

So, without further adieu, here are the instructions:

1- Click the Start menu, click Run, and type regedit, then click OK. This will open your system registry editor. While you're in the registry, please be careful. It is recommended that you back up your registry before you make any changes, as some changes could cause your system to boot incorrectly.

2- In the left pane, navigate through the directory structure to the following registry entry: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config

3- In the right pane, double click on AnnounceFlags, and change the Value Data field to 5. Click OK.

4- Next, you need to enable the NTP Server. Navigate to the following directory: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders

5- In the right pane, find NTPServer, double click it, and change the Value Data to 1.

6- Exit the registry editor.

7- Finally, you need to stop and start the NTP service, so open a command line (Start>Run>cmd>Enter) and type the following: net stop w32time & net start w32time

You're now set, on the server side.