[Sussex] Some "Time" questions

Nico Kadel-Garcia nkadel at gmail.com
Wed Jan 3 17:30:18 UTC 2007


Jon Fautley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> John David Thompson wrote:
>
>   
>> In Linux, I open a terminal and run the following commands:-
>> su (password)
>> ntpdate bear.zoo.bt.co.uk
>> exit
>>
>> Which works a treat! But...
>>
>> Questions.  How can I use a simple script to automate the above so that
>> I can simply click an icon on my Linux desktop to set the clock?  Can
>> this script be given special permissions so that the root password is
>> not required?  Can someone write this script for me - 'cause I'm a thickie!!
>>     
>
> Don't do this - it's considered bad :)
>
> You should enable the NTP service - depending on your distribution,
> there are various ways to do this. In Fedora, for example (as root):
>
> # yum -y install ntp
> [... blah ...]
>
> # chkconfig ntpd on
> # service ntpd start
>
> This will setup your system so that it will automatically synchronise
> the time at boot, and then use NTP to keep it in sync.
>   
Agreed, it's quite useful. This also relies on the servers in 
/etc/ntp.conf to be able to reach out through your firewalls to run NTP. 
About 10 minutes after starting NTPD, run "ntpstat localhost" to see if 
it's working, or run "ntptrace localhost" to see if you can run a trace 
back to a reliable NTP server. If you're inside a corporate firewall, 
you may have to set up or help your IT department set up an NTP server 
for internal use.

Also, it's usually good practice to list at least 3 NTP servers: that 
way, if one gets deranged for whatever reason, the other two can outvote it.




More information about the Sussex mailing list