June 2015
Intermediate to advanced
320 pages
7h 18m
English
The final topic that will be covered in this chapter is NTP. Synchronizing time with a centralized time server is a key step in any corporate network. We would like to compare the log files between various servers and see if the timestamp on each server is accurate; the log events may not then co-relate. Many authentication protocols, such as Kerberos, strictly rely on the accuracy of the time stamp reported by the client to the servers. Here, a third-party Python ntplib library will be introduced, and then the communication between the NTP client and the server will be investigated.
To create an NTP client, you need to call the ntplib's NTPCLient class.
import ntplib from time import ctime c = ntplib.NTPClient() response = c.request('pool.ntp.org') ...
Read now
Unlock full access