Stupid Tricks with Network Time
I normally point my machines to sync time with a server inside our company firewall. For desktop machines, this works fine. For laptops, it’s an issue because when the machine is off the company network, it can’t see the time server. Most of the time this is no big deal because the time is right (or almost right). But two things I’ve seen can cause the time to get set to the wrong value: 1) the battery goes dead and the system loses the time, and 2) a MacBook Pro gets booted into Windows and has its time updated while in Windows. (This, of course, is caused by the fact that OS X and Windows read the system clock in two different ways.) I’m sure there are other scenarios.
This is a problem because (once back in Mac OS X) the user cannot fix the time without an admin password. And even with the admin password, they have to either turn off network time sync, or point the network time sync to a server reachable on the network they are on. Once they return to the corporate network, either they now can’t reach the external time server because of firewall issues, or they have to remember to undo their changes, or some managment system in place (like radmind) undoes their changes for them, but then they have to redo them when they leave the office again!
I thought computers were supposed to make our life easier!
It would be so much easier if you could just specify multiple time servers – one inside the company network, and one outside. That way the time sync could happen no matter where you were.
Fortunately, you can do exactly that. There’s an undocumented feature of the Date & Time preferences pane: in the “Set date & time automatically” field, you can enter multiple servers seperated by a space. In the following image, you can see I’ve entered both “time” and “time.apple.com”:
This setting gets written to /private/etc/ntpd.conf, so you can also just manage this file:
rhapsody:~ gneagle$ cat /private/etc/ntp.conf
server time minpoll 12 maxpoll 17
server time.apple.com minpoll 12 maxpoll 17
You can add more than two servers if you want.Explore posts in the same categories: OS X, Windows