====== Samba : Synchronisation du temps ====== ===== Sur l'Hyperviseur (optionnel) ===== - Si vous lancez votre serveur NTP dans un container LXC, il faut l'autoriser à changer l'heure système.nano /etc/pve/local/lxc/110.conf lxc.cap.drop: lxc.cap.drop: mac_admin mac_override sys_module ===== Sur la machine serveur NTP ===== - Installer ntp & ntpdate apt-get install ntpdate ntpdate pool.ntp.org apt-get install ntp - Editer le fichier ntp.conf nano /etc/ntp.conf Et rajouter les lignes suivantes :ntpsigndsocket /var/lib/samba/ntp_signd restrict default mssntp - Changer le groupe propriétaire du socket chgrp ntp /var/lib/samba/ntp_signd - Redémarrer le service service ntp restart ===== Avec Chrony ===== confdir /etc/chrony/conf.d pool 2.debian.pool.ntp.org iburst sourcedir /run/chrony-dhcp sourcedir /etc/chrony/sources.d keyfile /etc/chrony/chrony.keys driftfile /var/lib/chrony/chrony.drift ntsdumpdir /var/lib/chrony logdir /var/log/chrony maxupdateskew 100.0 rtcsync makestep 1 3 leapsectz right/UTC allow 10.31.2.0/24 # dns netmask ntpsigndsocket /var/lib/samba/ntp_signd ===== La GPO pour configurer le domaine ===== "Computer Configuration" / "Administrative Templates" / "System" / "Windows Time Service" / "Time Providers" et modifier les paramètres ntpserver {{:samba:pasted:20210329-190411.png}} ===== Tester un serveur NTP sous Windows ===== w32tm /stripchart /computer:HOSTNAME-OR-IP ===== Sources ===== * https://dev.tranquil.it/wiki/SAMBA_-_Configuration_Samba4_NTP * https://wiki.samba.org/index.php/Time_synchronisation * https://forum.proxmox.com/threads/vm-time-server-on-proxmox4-step-systime-problem.27831/