Red Hat Bugzilla – Bug 57845
ntp-genkeys paths set wrong
Last modified: 2007-04-18 12:38:50 EDT
Description of Problem:
/usr/sbin/ntp-genkeys tries to create the NTPv3 keys file and links
in the wrong places by default.
By default, it sets the keyfile to /ntp.keys.<NTPtime> and a broken link
/usr/etc/ntp.keys -> /usr/etc/ntp.keys.<NTPtime>.
It should probably set the keyfile to /etc/ntp/keys.<NTPtime> and
a symbolic link /etc/ntp/keys -> /etc/ntp/keys.<NTPtime>.
Also, the -k option listed in the command's Usage is not implemented,
although -h is. In addition, despite the comment in the stock
/etc/ntp/keys file, we do not currently start ntpd with a -A option,
so no flags need to be changed for ntpd to activate authentication.
Oh, and as long as you're looking at it, the sample /etc/ntp/keys file has the
wrong permissions; it should be readable by user ntp (and no other user), since
that's who ntpd runs as now (not root).
should be fixed in:
As far as I can tell (using ntp-4.1.1-1 from RH7.3):
If the default /etc/ntp/keys file exists when you run ntp-genkeys, ntp-genkeys
silently fails to create any files whatsoever.
ntp-genkeys still makes a deposit in /ntp.keys.<timestamp>, with broken link as
/etc/ntp.conf still claims that ntpd is started with -A, when it isn't.
/etc/ntp/keys makes the same false claim.
The default /etc/ntp/keys is still root.root 600, so user ntp is going to have a
hard time reading it.
When run as root, ntp-genkeys creates the /ntp.keys.<timestamp> file as
root.root 600, again making it difficult for user ntp to read.
-k is still unsupported ("ntp-genkeys -k" returns
"ntp-genkeys: unknown option -k")
found another bug in genkeys... these snprintf(buf, "%s/%s", buf, s2) are
I installed 4.1.1a-2 off of rawhide...similar problems. Seems ntp-genkeys now
fails silently if /ntp.keys.<timestamp> exists. It still deposits the keyfile in
/ instead of /etc/ntp/
the fix is in 4.1.1a-3 ... you have to wait for it...
An errata has been issued which should help the problem described in this bug report.
This report is therefore being closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, please follow the link below. You may reopen
this bug report if the solution does not work for you.