Bonjour tout le monde.
J’ai une machine debian etch.Cette machine est une VM avec VMWare ESX.
Chaque jour, son heure se décale de deux ou trois minutes
Donc on voudrait qu’il se synchronise sur un controleur de domaine windows.
Pour cela on a intégré la machine au domaine, cela marche niquel.
Voici mon fichier ntp.conf
[code]# /etc/ntp.conf, configuration for ntpd
driftfile /var/lib/ntp/ntp.drift
statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable
You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example
pool.ntp.org maps to more than 300 low-stratum NTP servers.
Your server will pick a different set every time it starts up.
*** Please consider joining the pool! ***
*** http://www.pool.ntp.org/join.html ***
server 10.169.34.1
#server 0.debian.pool.ntp.org iburst
#server 1.debian.pool.ntp.org iburst
#server 2.debian.pool.ntp.org iburst
#server 3.debian.pool.ntp.org iburst
By default, exchange time with everybody, but don’t allow configuration.
See /usr/share/doc/ntp-doc/html/accopt.html for details.
#restrict -4 default kod notrap nomodify nopeer noquery
#restrict -6 default kod notrap nomodify nopeer noquery
Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1
Clients from this (example!) subnet have unlimited access,
but only if cryptographically authenticated
#restrict 192.168.123.0 mask 255.255.255.0 notrust
If you want to provide time to your local subnet, change the next line.
(Again, the address is an example only.)
#broadcast 192.168.123.255
If you want to listen to time broadcasts on your local subnet,
de-comment the next lines. Please do this only if you trust everybody
on the network!
#disable auth
#broadcastclient[/code]
L’ip du serveur Windows est donc 10.169.34.1
si je fait ntpq -p
[code] remote refid st t when poll reach delay offset jitter
10.169.34.1 10.204.1.1 2 u 12 64 377 0.240 -527.32 96.797[/code]
On voit bien que j’ai de l’offset et que le serveur n’a pas été sélectionné.
Voici les logs syslogs du démarrage de ntp
May 11 14:14:11 grasrlyoxivm ntpd[17456]: precision = 1.000 usec
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface wildcard, 0.0.0.0#123 Disabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface wildcard, ::#123 Disabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface eth0, fe80::20c:29ff:fee6:ee7a#123 Enabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface lo, ::1#123 Enabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface lo, 127.0.0.1#123 Enabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface eth0, 10.169.34.159#123 Enabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: Listening on interface eth0:0, 10.169.34.161#123 Enabled
May 11 14:14:11 grasrlyoxivm ntpd[17456]: kernel time sync status 0040
May 11 14:14:11 grasrlyoxivm ntpd[17456]: frequency initialized 0.000 PPM from /var/lib/ntp/ntp.drift
Par contre si je fait avec ntpdate-debian, la il se met bien à l’heure.
grasrlyoxivm:~# /etc/init.d/ntp stop
Stopping NTP server: ntpd.
grasrlyoxivm:~# ntpdate-debian
11 May 14:13:15 ntpdate[17302]: step time server 10.169.34.1 offset -0.772863 sec
Une des solutions va etre de faire une cron qui se lance chaque jour, pour remettre à l’heure,
mais bon j’aimerai quand meme bien comprendre pourquoi ntp ne se syncrhonise pas.
Merci de votre aide.