Sorgente oraria e stato

Mostra da dove il sistema prende l'ora e se la sincronizzazione funziona.

PowerShell (Windows)

w32tm Integrato

w32tm /query /status
w32tm /query /source

Get-Date Integrato

Get-Date -Format o
Get-TimeZone

Shell Unix (bash)

timedatectl Integrato

timedatectl status

chronyc / ntpq Strumento aggiuntivo

chronyc tracking
ntpq -p

Un membro del dominio prende l'ora dal domain controller; solo l'emulatore PDC usa una sorgente esterna.

Verificare un server di riferimento orario

Interroga un server di riferimento orario e mostra lo scarto per ogni campione.

PowerShell (Windows)

w32tm Integrato

w32tm /stripchart /computer:ch.pool.ntp.org /samples:5 /dataonly

w32tm peers Integrato

w32tm /query /peers

Shell Unix (bash)

timedatectl Integrato

timedatectl show-timesync --all

chronyc / ntpdate Strumento aggiuntivo

chronyc sources -v
ntpdate -q ch.pool.ntp.org

Sfasamento dell'orologio rispetto a un host

Confronta il vostro orologio con quello di un altro sistema: più di cinque minuti di sfasamento fanno fallire Kerberos.

PowerShell (Windows)

Invoke-Command / w32tm Integrato

w32tm /stripchart /computer:mail.example.com /samples:3 /dataonly
# Grosser Versatz bricht Kerberos (Standard: max. 5 Minuten).

net time Strumento aggiuntivo

net time \\mail.example.com

Shell Unix (bash)

date / curl Integrato

date -u
curl -sI https://mail.example.com | grep -i "^date:"
# Beide Zeiten vergleichen: grosser Versatz bricht Kerberos und TLS-Pruefungen.

ntpdate Strumento aggiuntivo

ntpdate -q mail.example.com

L'ora conta anche per la posta: un forte sfasamento fa apparire i certificati "non ancora validi" e sposta gli orari negli header.

Risincronizzare l'ora

Imposta la sorgente oraria e forza una sincronizzazione immediata.

PowerShell (Windows)

w32tm Integrato

w32tm /config /manualpeerlist:"ch.pool.ntp.org" /syncfromflags:manual /update
Restart-Service w32time
w32tm /resync /force

Get-Service Integrato

Get-Service w32time | Format-List Status, StartType

Shell Unix (bash)

timedatectl Integrato

sudo timedatectl set-ntp true
timedatectl timesync-status

chronyc Strumento aggiuntivo

sudo chronyc makestep
chronyc sources

Modifica la configurazione di sistema; su un domain controller eseguitelo solo consapevolmente e tenendo conto della gerarchia oraria.

Altre aree