[ntp:questions] Finding out where ntpd gets its ntp.conf file

Unruh unruh-spam at physics.ubc.ca
Thu Sep 4 23:41:35 UTC 2008


David Woolley <david at ex.djwhome.demon.co.uk.invalid> writes:

>Steve Kostecke wrote:
>> 
>> And your point is?

>My point is that there was reasonable grounds to believe that the OP had
>actually looked inside /etc/inet.d/ntpd, but you were telling him how to 
>find it.

>> 
>> It is highly likely that the OP has not bothered to grep the /etc/
>> directory for instances of 'ntp.conf'.

>He was already aware of /etc/ntp.conf, but assures us that it isn't 
>actually used by the ntpd in question.

Boy, I feel like a translation service. I think he meant the files in
/etc/init.d .Ie
grep ntp.conf /etc/init.d/*


>> 
>> That _one_ simple act would render this entire discussion moot because
>> it would clearly the ntp.conf file being passed to ntpd.

>I believe he has already established that it is not.

It might show that that file is /usr/lib/ntp.conf
(for some reason some distros like putting config stuff into a lib
directory. )


> > > [peterc at tantalus ~]$ strings /usr/sbin/ntpd|grep ntp.conf
> > > > /etc/ntp.conf

> > In the RHEL case, this would find exactly the wrong copy of ntp.conf,
> > being the one we were changing to no avail, not the one that NTP was in
> > fact using.

This would tell you what the default location was. REdhat might have
changed it to something else. and doing that would show you. Is it not
easier just to try the command and see what it produces than post here that
the results might not be usefull without trying it?



>Unfortunately I don't have access to a copy of RHEL and don't even have 
>access to earlier versions, at home, without formatting up a partition 
>and installing it, so I can't confirm what he is reporting and I'm 
>having to rely on my memory of how the start up scripts work.

>Typical things that might be done are:

>- using the /var tree (7 Google hits for /var/etc/ntp.conf;
>- using a sub-directory of /etc (582 for /etc/ntp/ntp.conf; 4 for 
>/etc/sysconfig/ntpd.conf; 75 for /etc/config/ntp.conf);
>- name variations (3420 /etc/ntpd.conf)
>- using a chroot environment (186 for chrooted ntpd, rather more for 
>chroot AND ntpd, although there isn't a simple test for filenames;
>- linking to /opt, with automatic "repair" of the link (SCO Openserver 
>will soft link /opt, but I don't think it would automatically repair).

>Even if they are not done for RHEL, he is using multiple systems, and 
>they may well be done for some of them.

Agreed. So I would first do the strings....|grep route, maybe seraching
just for conf instead of ntp.conf.
Then I would look in /etc/init.d/ntpd

Then when none of those produced anything helpful I would come back here
and ask for further help.





>> 




More information about the questions mailing list