LinuxQuestions.org
Have you heard the LinuxQuestions.org Podcast?
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Thread Tools
Old 01-20-2006, 06:44 AM   #1
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 536
Thanked: 11
Synchronize time


[Log in to get rid of this advertisement]
I have four machines (Debian x3, Ubuntu) I want to synchronize by time. They are connected with a hub, and all have access to the Internet. Any ideas how this is done?
kenneho is offline     Reply With Quote
Old 01-20-2006, 08:24 AM   #2
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69
Thanked: 0
hi, kenneho!

apt-get install ntp ntpdate and configure ntp to sync system clock with an apropriate to your TZ ntp server while ntpdate will adjust time at boot time.

cheers
vlado
zhelezov is offline     Reply With Quote
Old 01-20-2006, 08:30 AM   #3
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 536
Thanked: 11

Original Poster
Thanks, I'll give it a try. But is it possible to sync the machines without rebooting?
kenneho is offline     Reply With Quote
Old 01-20-2006, 08:34 AM   #4
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69
Thanked: 0
no need to reboot -- ntp takes care refreshing time inbetween reboots....and here is an eg. server: time.alcanet.no

glad to!
zhelezov is offline     Reply With Quote
Old 01-20-2006, 08:34 AM   #5
betrayed
LQ Newbie
 
Registered: Jul 2005
Location: Denver
Distribution: Debian testing/unstable
Posts: 17
Thanked: 0
ntpdate timeserver
just run that from root when ever you feel the need to sync time
betrayed is offline     Reply With Quote
Old 01-20-2006, 08:43 AM   #6
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 536
Thanked: 11

Original Poster
Thanks for the replies. I'll give it a try, and hopefully it will work.
kenneho is offline     Reply With Quote
Old 01-20-2006, 08:56 AM   #7
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69
Thanked: 0
found one more package -- chrony
zhelezov is offline     Reply With Quote
Old 01-20-2006, 09:28 AM   #8
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 536
Thanked: 11

Original Poster
For some reason I get the following error:

"(...)no server suitable for synchronization found"

I tried the server ntp.uio.no, but it doens't work. I can ping the server, but ntpdate gives me
the error above. I tried adding the -u option, but still no luck. Any ideas?
By the way, the main issue here is to synchronize the machines with each other, not necessarily with "the internet". So if it easier, I could set up a ntp server on one of the machines and have the other sync with that. But I don't know how this is done. I'm guessing its easier sync'ing with an already dedicated server.
kenneho is offline     Reply With Quote
Old 01-20-2006, 10:38 AM   #9
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69
Thanked: 0
anyway, ntpdate will be deprecated soon while running a ntp daemon will be far more accurate and convenient cuz you could become a time_provider to your local subnet. consider installing ntp-simple -- the ntp.conf file you'll find in /etc is simple enough to set for minutes, and you have your ntpd sync'ing in the background.
Quote:
But I don't know how this is done
the ntp-doc package provides extensive documentation in html format if you happen to need it.

vlado

Last edited by zhelezov; 01-20-2006 at 10:39 AM..
zhelezov is offline     Reply With Quote
Old 01-20-2006, 11:03 AM   #10
zhelezov
Member
 
Registered: Jan 2006
Location: Bulgaria
Distribution: debian, grml, ubuntu
Posts: 69
Thanked: 0
one more note -- the default ntp version used by ntpdate is 3. maybe you try using older one with the -o switch, like

ntpdate -o 2 some.ntp.server
zhelezov is offline     Reply With Quote
Old 01-20-2006, 12:09 PM   #11
betrayed
LQ Newbie
 
Registered: Jul 2005
Location: Denver
Distribution: Debian testing/unstable
Posts: 17
Thanked: 0
ntpdate time.windows.com

works for me.
betrayed is offline     Reply With Quote
Old 01-21-2006, 06:08 AM   #12
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 536
Thanked: 11

Original Poster
I give up for now. Can't get it to work. Have tried "ntpdate <server>" using several servers (including windows), have tried different options to ntpdate, have tried and set up my own server. The firewall-setting should be okay. I'm still getting the "no server suitable for synchronization found" error.

I think I'll put it aside for now, and have a go at it later. But thanks for the help anyways, guys!
kenneho is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
synchronize time between linux and XP server taiwf Linux - General 1 11-03-2005 10:52 PM
synchronize linux domain time to workstation sunnyee Linux - Newbie 2 06-25-2004 05:37 AM
Tar and synchronize kaboom Linux - Software 4 12-12-2003 04:32 AM
Synchronize Password... chuck77 Linux - General 2 03-13-2002 11:29 AM
Synchronize Password... chuck77 Linux - General 1 03-13-2002 04:15 AM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration