Bug 12518

Summary: ntpq -p gives error. a line, "restrict 127.0.0.1" needs to be added in /etc/ntp.conf
Product: IPFire Reporter: paul <kairis>
Component: ---Assignee: Michael Tremer <michael.tremer>
Status: CLOSED FIXED QA Contact:
Severity: - Unknown -    
Priority: - Unknown - CC: cab_77573, michael.tremer, peter.mueller
Version: 2   
Hardware: unspecified   
OS: Unspecified   

Description paul 2020-10-29 20:14:41 UTC
On a fresh core 151 install, ntpq -p outputs:

[root@ipfire ~]# ntpq -p
localhost.localdomain: timed out, nothing received
***Request timed out

/etc/ntp.conf is missing a line, "restrict 127.0.0.1" after the restrict default

source code shows that such a line should be added after line 87 
https://github.com/ipfire/ipfire-2.x/blob/master/lfs/ntp

with this change, restart ntpd, ntpq -p shows no timeout error.


 
Also, line 85 should be "chown -R root:root /etc/ntp" since at times, this line appears in /var/log/messages  

ntpd[13486]: frequency file /etc/ntp/drift.TEMP: Permission denied
Comment 1 Charles Brown 2020-10-30 13:29:18 UTC
On a related note: the "chown -R ntp:ntp /etc/ntp" on line 85 needs changed so that root can write the /etc/ntp/drift file.  Otherwise you get:
"00:36:12 ntpd[14000]:  frequency file /etc/ntp/drift.TEMP: Permission denied"
when ntp tries to write the drift file.