Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email 



AUTOMATIC TIME SYNCING


Sure you want your computer to show the correct date and time.

If your distro does not support ntp ( Network Time Protocol ) for syncing time with a remote time server, or you have a hard time configuring it, here is what you can do using the rdate command:

First install rdate:

CODE
# apt-get install rdate


Then first test this command to make sure it reports no errors:

CODE
# rdate -s clock-1.cs.cmu.edu && hwclock --systohc

( If it does report errors, try leaving off the "&& hwclock --systohc" part which changes the hardware clock as well )


Next, depending on your distro you can add that line at the bottom of the next file:

Fedora: /etc/rc.local
Red Hat: /etc/rc.local
Debian: /etc/rc.boot
Slackware: /etc/rc.d/rc.local
SUSE: /etc/init.d/boot.local
Mandrake: /etc/rc.local
PCLos: /etc/rc.local

Now, every time you boot your computer the time will synced !



Bruno



NOTE: You should be connected to the internet at boot for this to work.


-- Jun 7 2005 ( Revised Dec 15 2005 ) --


Tips Linux Explorers   All Things Linux Forum   Great Linux Links   LinuxClues.com   Hometown   Email