Thursday, March 15, 2007

How to configure a Red Hat Linux machine to sync with a Time Server.

Getting Red Hat Linux to connect to and sync with a time server is very easy, maybe even easier than Windows. To do this, make sure you're logged into the system as root, and open a terminal windows.

1- cd /etc

2- vi ntp.conf

3- Add the following text: server
*where is the IP address of your time server

4- wq!

5- Go to the Date & Time settings (Applications>System Settings>Date & Time) and click the "Enable Network Time Protocol" checkbox. You should see the IP address (or hostname, if your /etc/hosts file is configured) in the NTP servers box.

6- Click OK, and your system should sync with the time server!

How to configure a Windows XP machine to sync with a Time Server.

Now, to enable a Windows machine to sync to this server, use this procedure. There are tons of different procedures out there, but this is the one that worked for me. Your mileage may vary.

Open a command line prompt (Start>Run>cmd>Enter) and type the following:

1- w32tm /config /manualpeerlist:,0x8 /syncfromflags:MANUAL
*where is the address of your time server

2- net stop w32time & net start w32time

3- w32tm /resync

If all is configured properly, your Windows system should sync itself with the time server, and if you open up your Time and Date properties, and click on the "Internet Time" tab, you will see that your system has sync'd with the new time server; it will show the time server's IP address, and the time at which is sync'd.

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.

First post.

This is my first post on my new blog, Dr. Pepper and the Screaming Chicken. Yeah, weird name, right?

As I was trying to figure out a name for the blog, I though...why not call it something I keep at my desk? Originally it was going to be just "The Screaming Chicken blog," but someone already had the url. So, my Diet Dr. Pepper became my muse.

Yeah, that's right, I have a screaming chicken at my desk. It hangs next to my calendar, and is typically just a way to release some steam after getting off the phone with a particularly annoying user. It has the letters "QA" written on it, symbolizing my company's commitment to "Quality Assurance." There's a back story behind it, which I may or may not get into at a later date.

So anyway, what am I trying to do here?

There are lots of random tidbits that I've found around the web for fixing all sorts of problems, so I'm going to stick them here, in the hopes of helping someone out. There will be a little of this, a little of that, and I'll likely update it when I learn something new. Since I've just taken over two new labs with mostly Red Hat systems, there will likely be frequent postings, mostly about linux systems.