我的FreeIPA服务器的日期时间漂移了大约10分钟,导致登录失败。ntpd服务正在启动和运行。我检查了配置,并注意到freeIPA添加了一个本地服务器来同步ntpd.conf文件中的时间。
这就是ntpd.conf中FreeIPA添加的内容:
### Added by IPA Installer ###
server 127.127.1.0 iburst
fudge 127.127.1.0 stratum 10我也有标准的百人池。
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst但是,ntpd服务不会使用公共ntp池,也不会纠正漂移,因为它查看本地ntpd服务器。
使用FreeIPA添加的行,当我试图强制ntpd更新其时间时,这就是我得到的:
service ntpd stop
ntpd -gq
ntpd: time slew +0.000000s
service ntpd start删除由ntpd.conf添加到FreeIPA的行可以使更新正常工作:
service ntpd stop
ntpd -gq
ntpd: time set -543.065651s
service ntpd start所以我的问题是:
完全配置:
# For more information about this file, see the man pages
# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).
driftfile /var/lib/ntp/drift
# Permit time synchronization with our time source, but do not
# permit the source to query or modify the service on this system.
restrict default nomodify notrap nopeer noquery
# Permit all access over the loopback interface. This could
# be tightened as well, but to do so would effect some of
# the administrative functions.
restrict 127.0.0.1
restrict ::1
# Hosts on local network are less restricted.
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
server 0.centos.pool.ntp.org iburst
server 1.centos.pool.ntp.org iburst
server 2.centos.pool.ntp.org iburst
server 3.centos.pool.ntp.org iburst
#broadcast 192.168.1.255 autokey # broadcast server
#broadcastclient # broadcast client
#broadcast 224.0.1.1 autokey # multicast server
#multicastclient 224.0.1.1 # multicast client
#manycastserver 239.255.254.254 # manycast server
#manycastclient 239.255.254.254 autokey # manycast client
# Enable public key cryptography.
#crypto
includefile /etc/ntp/crypto/pw
# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys
# Specify the key identifiers which are trusted.
#trustedkey 4 8 42
# Specify the key identifier to use with the ntpdc utility.
#requestkey 8
# Specify the key identifier to use with the ntpq utility.
#controlkey 8
# Enable writing of statistics records.
#statistics clockstats cryptostats loopstats peerstats
# Disable the monitoring facility to prevent amplification attacks using ntpdc
# monlist command when default restrict does not include the noquery flag. See
# CVE-2013-5211 for more details.
# Note: Monitoring will not be disabled with the limited restriction flag.
disable monitor
### Added by IPA Installer ###
### Added by IPA Installer ###
### Added by IPA Installer ###
server 127.127.1.0 iburst
fudge 127.127.1.0 stratum 10发布于 2018-10-30 01:14:20
有了10块软糖,它真的不应该选择当地的时钟。
您可以尝试使用服务器池之一的prefer选项来强制它选择internet时间源:
server 0.centos.pool.ntp.org iburst prefer
在进行更改并重新启动服务之后,在运行ntpq -pn查询服务状态时,应该会在首选池旁边看到星号(*)。
https://serverfault.com/questions/937765
复制相似问题