On Wed, Aug 21, 2002 at 09:48:42PM -0400, Daniel Feenberg wrote: > There is something mysterious about RH 7.3 time-keeping, but I don't > know if it has anything to do with your troubles. > > 7.3 installs ntpd by default, but runs it as user "ntp" (which isn't root > and therefore can't set the clock) and directs it to 127.0.0.1 the correct > time, which is pointless, as far as I can tell. > > I posted some details at http://www.nber.org/sys-admin/ntpd.html > > I would welcome corrections or explanations.
Well, I'll see what I can do for you. As for my problem, after I noticed
the problem, I thought it was NTP related (figuring what else would skew
the clock?) so I killed the daemon off. Still had the same problem.
> 1. /etc/init.d/ntpd reads a list of arguments for ntpd from the file
> /etc/sysconfig/ntpd when starting ntpd. By Redhat default the arguments
> are "-U ntp". These arguments are not documented in the ntpd man page
> or on the man pages at www.ntp.org.
It actually is documented in /usr/share/doc/ntp-4.1.1/ntpd.htm:
-U server_user
Ntpd process drops root privileges and changes user ID to
server_user and group ID to the primary group of server_user. To
use this option you need libcap-library.
> The apparent effect of this is to make ntpd run as user ntp. But user ntp
> (with UID=38) is not root, and thus no has ability to update the computer
> clock. Nor could it bind to the time port. It is very difficult to
> understand how this error could persist, but even after several months
> it is not mentioned on the RH website and "up2date" does not bring a
> correction. A few people have mentioned it in newsgroups.
Well, the time (37) port or the ntp (123) port? It wouldn't bind to
37, that's taken care of by inet in Linux anyway, and it does bind to
123 since it binds then drops privs. I don't know if there's an issue
with it updating the clock, but it seems to work. I've been told, while
researching this problem, that the Linux kernel only reads the hardware
clock at boot up, so only the software clock needs to be updated.
Related to my problem, I also found out that the software clock gets
updated by interrupt 0, which in PCs runs at 100Hz. From what I can tell,
via /proc/interrupts, mine is running at the correct speed.
> 2. The Redhat installation program never prompts for the address of an
> actual ntp server, nor does it do any searching on its own. Rather it
> specifies 127.127.0.1 for the ntp server in the default /etc/ntp.conf
> file. I can't imagine what this accomplishes, as that merely points
> to localhost.
This is a "fudge" server configuration. Basically if no other servers
are available, ntpd will bind to itself. This lets anyone binding to
it stay bound. Otherwise this server goes stratum 16, and all clients
do the same. It's pretty standard actually.
--
Theo Van Dinter, [EMAIL PROTECTED][EMAIL PROTECTED]
Consultant, Collective Technologies (www.collectivetech.com)
Systems Administrator, bblisa.org/kluge.net
msg00268/pgp00000.pgp
Description: PGP signature
