[ntp:questions] Finding out where ntpd gets its ntp.conf file
joegwinn at comcast.net
Tue Sep 9 13:25:53 UTC 2008
At 6:30 PM -0400 9/8/08, James Cloos wrote:
> >>>>> "Joseph" == Joseph Gwinn <joegwinn at comcast.net> writes:
>Joseph> so we cleaned [ntp.conf] down to maybe three lines, and
>Joseph> then stopped and started ntpd using the "service" utility.
>Joseph> Read the "service" shell script. It appears to get its file
>Joseph> paths from environment variables named after the thing being
>Joseph> started and stopped and accessible only in the root environment
>I read through most of the replies so far, but one thing I haven't seen
>noted is that this isn't an ntp issue at all, but rather that you were
>using system(8) as a black box.
It is certainly true that our sysadmins knew little of how service
works. Their main effort to date has been with the AIX servers.
I'm not a sysadmin, but am digging into service. I don't recall that
the service man page was that helpful, but will look again.
>Anyone starting or stopping daemons needs to know how the distribution
>in use does it and should emulate that as close as possible.
True enough, but harried sysadmins don't necessarily achieve this.
Nor do our sysadmins know that much about time, and were using NTP as
a black box.
When they have a time-related problem, I get the call. So far, I've
been able to figure the root causes out. They were not able to
figure out why we could not get loopstats and peerstats recording to
work - it was the trojan ntp.conf file.
>I haven't used RH is years, and am not familiar with system(8) or how
>well it is documented (and am writing this while offline and so cannot
>look it up), but it is almost always the case that things will break if
>services are started in anything other than a root login or su - session.
>Even when using sudo(8) it is best to 'su -' before starting daemons.
At least for ntpd, one must be in root (or use su) for service to
work under RHEL, because every thin the sysadmin forgot to su,
service ntpd start/stop failed.
>Anyone administrating any box simply needs to know how the specific
>distribution does things in order to safely customize the install.
Absolutely. We are now figuring this out. I have no idea who
generated the cruft-laden ntp.conf files.
>James Cloos <cloos at jhcloos.com> OpenPGP: 1024D/ED7DAEA6
More information about the questions