Gg » Historique » Version 2
Version 1 (Gilles Grandgérard, 03/09/2015 16:34) → Version 2/4 (Gilles Grandgérard, 03/09/2015 16:34)
h1. Gg
NTPD
<pre>
# Begin /etc/ntp.conf
# Associate to the public NTP pool servers
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
# Location of drift file
driftfile /var/lib/ntp/ntpd.drift
# Location of the log file
logfile /var/log/ntpd
# Location of the update directory
ntpsigndsocket /var/lib/samba/ntp_signd/
# Restrictions
restrict default kod limited nomodify notrap nopeer mssntp
restrict 127.0.0.1
restrict ::1
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
# End /etc/ntp.conf
</pre>
Create the state directory and set permissions:
<pre>
# install -d /var/lib/samba/ntp_signd
# chown root:ntp /var/lib/samba/ntp_signd
# chmod 0750 /var/lib/samba/ntp_signd
</pre>
service ntp restart
Enable and start the ntpd service.
NTPD
<pre>
# Begin /etc/ntp.conf
# Associate to the public NTP pool servers
server 0.pool.ntp.org
server 1.pool.ntp.org
server 2.pool.ntp.org
# Location of drift file
driftfile /var/lib/ntp/ntpd.drift
# Location of the log file
logfile /var/log/ntpd
# Location of the update directory
ntpsigndsocket /var/lib/samba/ntp_signd/
# Restrictions
restrict default kod limited nomodify notrap nopeer mssntp
restrict 127.0.0.1
restrict ::1
restrict 0.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
restrict 1.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
restrict 2.pool.ntp.org mask 255.255.255.255 nomodify notrap nopeer noquery
# End /etc/ntp.conf
</pre>
Create the state directory and set permissions:
<pre>
# install -d /var/lib/samba/ntp_signd
# chown root:ntp /var/lib/samba/ntp_signd
# chmod 0750 /var/lib/samba/ntp_signd
</pre>
service ntp restart
Enable and start the ntpd service.