HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free and registered users see less advertising! If you just want to browse through the existing questions, just select the forum that you want to visit from the selection below. Otherwise, click here to register!. We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Keep your boxes in time sync

This was posted by Otheos at www.techimo.com and he kindly gave me permision to reprint it here

The first thing you need to do is make sure the package rdate is installed, there are packages for both debain and redhat based systems.

Next you need a time server that has accurate time. time.nrc.ca is a good one

Then you need one box to get the time from this server:

Code:

rdate -s time.nrc.ca

Then you need your other boxes to read the time from your local server:

Code:

rdate -s myserver where myserver is the Linux machine you just set the time to.

or you can set each box to do it directly from outside. You can do it once in boot time, or make a cron job for it in the root users crontab. To do this type as user root crontab -e in a terminal and then enter

Code:

0 * * * * /usr/bin/rdate -s time.nrc.ca

This will sync the computer at the start of every hour.
Finally if you run samba on your local server you can have your windows boxes setting their time from it by adding:

Code:

time server = Yes

under the [global] in your smb.conf and then from your windows boxes (w2k, sorry this is what I know/use) do from the cli:

Code:

net time \\myserver /set /yes

You can make a shortcut to it and add it in your startup.
Now all your boxes have the same time