problem with Time in Dapper

Richard Johnson nixternal at ubuntu.com
Wed Oct 25 05:40:45 UTC 2006


On Monday 23 October 2006 20:10, Howard Coles Jr. wrote:
> I have two machines running Dapper, one a desktop the other my laptop.
>
> The Desktop generally stays running all the time, for weeks on end.  The
> problem is the time drifts horribly.  In about 2 days the time will be fast
> by at least 20 Minutes.  I have stopped it from checking the hardware, and
> I have made sure the ntpd daemon is starting, but no matter what it drifts.
>
> Has anyone else seen this, or does anyone have any ideas?
>
> --
> See Ya'
> Howard Coles Jr.
> John 3:16!
>
> http://risenbooks.com Christian bookstore

Sorry, if someone already put this, I appologize, but I am not about to read 
through everyone of the replies right now ;)

Here is how you fix your problem. From the command line, you want to do

sudo nano /etc/crontab

Your crontab should look like the following, if you haven't made any edits to 
it
----------------------------------------------------------------------------------------------------------------------
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user  command
17 *    * * *   root    run-parts --report /etc/cron.hourly
25 6    * * *   root    test -x /usr/sbin/anacron || 
run-parts --report /etc/cron.daily
47 6    * * 7   root    test -x /usr/sbin/anacron || 
run-parts --report /etc/cron.weekly
52 6    1 * *   root    test -x /usr/sbin/anacron || 
run-parts --report /etc/cron.monthly
#
--------------------------------------------------------------------------------------------------------------------------

On the line prior to the # at the end, and the "52 6    1 * *   root    
test -x /usr/sbin/anacron || run-parts --report /etc/cron.monthly" line, add 
the following line:

0  *    * * *   root    ntpdate -s ntp.ubuntu.com

Once you have added that line, do the following:

Control+X      closes nano
Y    for yes (to save the changes)
Enter     saves the file

What this does is run ntpdate -s (silent) against the ntp.ubuntu.com time 
server every hour on the hour. My current offset since the last update 40 
minutes ago is

25 Oct 00:39:21 ntpdate[28699]: adjust time server 82.211.81.145 
offset -0.244109 sec

Hope this helps, Enjoy!

-- 
.:Richard Johnson
.:nixternal at ubuntu.com
.:ubuntu.com .:kubuntu.com .:edubuntu.com .:xubuntu.com
.:http://nixternal.ubuntu-rocks.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20061025/a821713e/attachment.sig>


More information about the kubuntu-users mailing list