Mac – Set NTP time server from command line

Active Directory login, Keyserver access, SafeConnect, etc all require the connecting client to have a time setting that is within 5 minutes or so of the server’s time setting.  It is therefore useful to use a “network time protocol” server to set your local computer’s time to the “correct” time.

Macs typically use “time.apple.com” to set their time from the network.  This is fine most of the time. 😉

In the rare times you want to set a different time server on a Mac, use Terminal and enter the command:

sudo systemsetup -setnetworktimeserver <timeserver>
(replace <timeserver> with the address of the time server 
you want to use as in 137.165.4.21 for Williams College)

Since this is a command run with “sudo”, you’ll be asked to enter the account password and that account needs to be authorized as a “Super User” or “root” user.

By the way – the GUI interface in the “Date & Time” System preference only allows you to choose time servers hosted by Apple.

For more details see the web page at:

http://hints.macworld.com/comment.php?mode=view&cid=98039

 

This entry was posted in Labs and tagged , , , . Bookmark the permalink.

Comments are closed.