Unix Technical Forum

My ntp.conf file gets overwritten!

This is a discussion on My ntp.conf file gets overwritten! within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> I have a simple two line ntp.conf file server tick.jrc.us driftfile /etc/ntp/ntp.drift ntp works fine and sets time. At ...


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-18-2008, 09:32 PM
Peter
 
Posts: n/a
Default My ntp.conf file gets overwritten!

I have a simple two line ntp.conf file

server tick.jrc.us
driftfile /etc/ntp/ntp.drift

ntp works fine and sets time. At some point, an entirely new ntp.conf file
is written to /etc and of course, time stops updating. I grepped for the
file but could not find it.

Here is the replaced ntp,conf

*** ntp.conf replaced ***
restrict default noquery notrust nomodify
restrict 127.0.0.1
restrict 192.168.2.0 mask 255.255.255.0
fudge 127.127.1.0 stratum 3
server 127.127.1.0
driftfile /etc/ntp.drift
logfile /var/log/ntp.log
*** end file ***

Where can I look to see why this is occurring?

Linux version slackware 9.1, kernel 2.4.23, ntpd: ntpd 4.1.2@1.892 Thu Sep
11 23:47:04 PDT 2003 (1)

Here is today's ntp.log. Somewhere along the line, ntp.conf was replaced.

*** ntp.log ***
22 Dec 05:55:10 ntpd[2821]: signal_no_reset: signal 17 had flags 4000000
22 Dec 05:58:25 ntpd[2820]: time set -17.143459 s
22 Dec 05:58:25 ntpd[2820]: synchronisation lost
22 Dec 06:00:17 ntpd[2820]: ntpd exiting on signal 15
22 Dec 06:00:42 ntpd[2907]: signal_no_reset: signal 17 had flags 4000000
22 Dec 06:01:40 ntpd[2906]: ntpd exiting on signal 2
22 Dec 06:07:30 ntpd[3010]: signal_no_reset: signal 17 had flags 4000000
22 Dec 06:11:02 ntpd[3009]: time set -0.037555 s
22 Dec 06:11:02 ntpd[3009]: synchronisation lost
22 Dec 06:26:21 ntpd[3009]: kernel time discipline status change 1
22 Dec 08:58:18 ntpd[3009]: ntpd exiting on signal 15
22 Dec 09:02:22 ntpd[1120]: ntpd exiting on signal 15
22 Dec 09:08:31 ntpd[1120]: time set 0.000000 s
22 Dec 09:08:31 ntpd[1120]: synchronisation lost
22 Dec 09:18:18 ntpd[1120]: ntpd exiting on signal 15
22 Dec 10:19:40 ntpd[1120]: time set 0.000000 s
22 Dec 10:19:40 ntpd[1120]: synchronisation lost
22 Dec 10:55:21 ntpd[1120]: ntpd exiting on signal 15
22 Dec 11:00:29 ntpd[1120]: time set 0.000000 s
22 Dec 11:00:29 ntpd[1120]: synchronisation lost
22 Dec 12:45:58 ntpd[1120]: ntpd exiting on signal 15
22 Dec 12:50:26 ntpd[1120]: kernel time discipline status change 41


Thanks and Happy Holidays. Pete
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-18-2008, 09:32 PM
Wolfgang S. Rupprecht
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!


Peter <nospam@dontreply.com> writes:
> *** ntp.conf replaced ***
> restrict default noquery notrust nomodify
> restrict 127.0.0.1
> restrict 192.168.2.0 mask 255.255.255.0
> fudge 127.127.1.0 stratum 3
> server 127.127.1.0
> driftfile /etc/ntp.drift
> logfile /var/log/ntp.log
> *** end file ***


You might want to add an un-restriction for your local clocks:

restrict 127.127.0.0 mask 255.255.0.0 # internal clocks


-wolfgang
--
Wolfgang S. Rupprecht http://www.wsrcc.com/wolfgang/
The above "From:" address is valid. Don't mess with it.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-18-2008, 09:32 PM
David
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!

Peter wrote:
> I have a simple two line ntp.conf file
>
> server tick.jrc.us
> driftfile /etc/ntp/ntp.drift
>
> ntp works fine and sets time. At some point, an entirely new ntp.conf file
> is written to /etc and of course, time stops updating. I grepped for the
> file but could not find it.
>
> Here is the replaced ntp,conf
>
> *** ntp.conf replaced ***
> restrict default noquery notrust nomodify
> restrict 127.0.0.1
> restrict 192.168.2.0 mask 255.255.255.0
> fudge 127.127.1.0 stratum 3
> server 127.127.1.0
> driftfile /etc/ntp.drift
> logfile /var/log/ntp.log
> *** end file ***
>
> Where can I look to see why this is occurring?


man dhcpcd
-N Prevents dhcpcd from replacing existing /etc/ntp.conf file.


Add the "-N" option to the dhcpcd line in /etc/rc.d/rc.inet1

/sbin/dhcpcd -t -N 10 -h ${DHCP_HOSTNAME[$1]} -d eth${1}
else
/sbin/dhcpcd -t -N 10 -d eth${1}

--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.23 SMP i686 (GCC) 3.3.2
Uptime: 4 days, 4:25, 2 users, load average: 1.34, 1.23, 1.16
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-18-2008, 09:32 PM
Ryan Moore
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!

One possibility is a DHCP client daemon. Not sure about the DHCP client
on Slackware, but often you can pass "-N" to keep it from overwritting
your NTP configuration.

Read the man page on your DHCP client daemon.

On Mon, 22 Dec 2003, Peter wrote:

> I have a simple two line ntp.conf file
>
> server tick.jrc.us
> driftfile /etc/ntp/ntp.drift
>
> ntp works fine and sets time. At some point, an entirely new ntp.conf file
> is written to /etc and of course, time stops updating. I grepped for the
> file but could not find it.
>
> Here is the replaced ntp,conf
>
> *** ntp.conf replaced ***
> restrict default noquery notrust nomodify
> restrict 127.0.0.1
> restrict 192.168.2.0 mask 255.255.255.0
> fudge 127.127.1.0 stratum 3
> server 127.127.1.0
> driftfile /etc/ntp.drift
> logfile /var/log/ntp.log
> *** end file ***
>
> Where can I look to see why this is occurring?
>
> Linux version slackware 9.1, kernel 2.4.23, ntpd: ntpd 4.1.2@1.892 Thu Sep
> 11 23:47:04 PDT 2003 (1)
>
> Here is today's ntp.log. Somewhere along the line, ntp.conf was replaced.
>
> *** ntp.log ***
> 22 Dec 05:55:10 ntpd[2821]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 05:58:25 ntpd[2820]: time set -17.143459 s
> 22 Dec 05:58:25 ntpd[2820]: synchronisation lost
> 22 Dec 06:00:17 ntpd[2820]: ntpd exiting on signal 15
> 22 Dec 06:00:42 ntpd[2907]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 06:01:40 ntpd[2906]: ntpd exiting on signal 2
> 22 Dec 06:07:30 ntpd[3010]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 06:11:02 ntpd[3009]: time set -0.037555 s
> 22 Dec 06:11:02 ntpd[3009]: synchronisation lost
> 22 Dec 06:26:21 ntpd[3009]: kernel time discipline status change 1
> 22 Dec 08:58:18 ntpd[3009]: ntpd exiting on signal 15
> 22 Dec 09:02:22 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 09:08:31 ntpd[1120]: time set 0.000000 s
> 22 Dec 09:08:31 ntpd[1120]: synchronisation lost
> 22 Dec 09:18:18 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 10:19:40 ntpd[1120]: time set 0.000000 s
> 22 Dec 10:19:40 ntpd[1120]: synchronisation lost
> 22 Dec 10:55:21 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 11:00:29 ntpd[1120]: time set 0.000000 s
> 22 Dec 11:00:29 ntpd[1120]: synchronisation lost
> 22 Dec 12:45:58 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 12:50:26 ntpd[1120]: kernel time discipline status change 41
>
>
> Thanks and Happy Holidays. Pete
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-18-2008, 09:32 PM
/dev/rob0
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!

In article <u4-dnbUCL6Ue-XqiRVn-gQ@comcast.com>, Peter wrote:
> Where can I look to see why this is occurring?


dhcpcd (DHCP client) is doing it. You can change your dhcpcd command in
/etc/rc.d/rc.inet1 to add the -N option ("man dhcpcd"). Normally I do
not recommend editing these scripts other than rc.local, but in this
case it is necessary.
--
/dev/rob0 - preferred_email=i$((28*28+28))@softhome.net
or put "not-spam" or "/dev/rob0" in Subject header to reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-18-2008, 09:33 PM
Allen McIntosh
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!

In article <Pine.LNX.4.56.0312221425350.28434@jaipur>,
Ryan Moore <rmoore@rmoore.dyndns.org> wrote:
>One possibility is a DHCP client daemon. Not sure about the DHCP client
>on Slackware, but often you can pass "-N" to keep it from overwritting
>your NTP configuration.
>Read the man page on your DHCP client daemon.


Usually it renames the file, so the original will still be around,
named ntp.conf.[something].
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-18-2008, 09:33 PM
Peter
 
Posts: n/a
Default Re: My ntp.conf file gets overwritten!

Thanks all for the quick response. I would not have been able to debug that
so quickly. Interesting that in my Mandrake setup, this NEVER occurred!
Live and learn.

Peter wrote:

> I have a simple two line ntp.conf file
>
> server tick.jrc.us
> driftfile /etc/ntp/ntp.drift
>
> ntp works fine and sets time. At some point, an entirely new ntp.conf
> file
> is written to /etc and of course, time stops updating. I grepped for the
> file but could not find it.
>
> Here is the replaced ntp,conf
>
> *** ntp.conf replaced ***
> restrict default noquery notrust nomodify
> restrict 127.0.0.1
> restrict 192.168.2.0 mask 255.255.255.0
> fudge 127.127.1.0 stratum 3
> server 127.127.1.0
> driftfile /etc/ntp.drift
> logfile /var/log/ntp.log
> *** end file ***
>
> Where can I look to see why this is occurring?
>
> Linux version slackware 9.1, kernel 2.4.23, ntpd: ntpd 4.1.2@1.892 Thu Sep
> 11 23:47:04 PDT 2003 (1)
>
> Here is today's ntp.log. Somewhere along the line, ntp.conf was replaced.
>
> *** ntp.log ***
> 22 Dec 05:55:10 ntpd[2821]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 05:58:25 ntpd[2820]: time set -17.143459 s
> 22 Dec 05:58:25 ntpd[2820]: synchronisation lost
> 22 Dec 06:00:17 ntpd[2820]: ntpd exiting on signal 15
> 22 Dec 06:00:42 ntpd[2907]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 06:01:40 ntpd[2906]: ntpd exiting on signal 2
> 22 Dec 06:07:30 ntpd[3010]: signal_no_reset: signal 17 had flags 4000000
> 22 Dec 06:11:02 ntpd[3009]: time set -0.037555 s
> 22 Dec 06:11:02 ntpd[3009]: synchronisation lost
> 22 Dec 06:26:21 ntpd[3009]: kernel time discipline status change 1
> 22 Dec 08:58:18 ntpd[3009]: ntpd exiting on signal 15
> 22 Dec 09:02:22 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 09:08:31 ntpd[1120]: time set 0.000000 s
> 22 Dec 09:08:31 ntpd[1120]: synchronisation lost
> 22 Dec 09:18:18 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 10:19:40 ntpd[1120]: time set 0.000000 s
> 22 Dec 10:19:40 ntpd[1120]: synchronisation lost
> 22 Dec 10:55:21 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 11:00:29 ntpd[1120]: time set 0.000000 s
> 22 Dec 11:00:29 ntpd[1120]: synchronisation lost
> 22 Dec 12:45:58 ntpd[1120]: ntpd exiting on signal 15
> 22 Dec 12:50:26 ntpd[1120]: kernel time discipline status change 41
>
>
> Thanks and Happy Holidays. Pete


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com