Posted on 11-07-2012 12:52 PM
Is there a way ( via a policy or MCX ) to force the date and time to sync to time.apple.com for managed computers?
I looked through the MCX templates and didn't see anything.
Anyone try to do this before?
Solved! Go to Solution.
Posted on 11-07-2012 01:21 PM
You can run do this via shell script. There are just a few commands that you need:
systemsetup -setusingnetworktime on # this confirms that network time service is turned on
systemsetup -setnetworktimeserver time.apple.com # this sets the time server
and
ntpdate -u time.apple.com # this is the one that actually tells the date function to check in with the time server
I found that sometimes the timezone placeholder (/etc/localtime) gets corrupt for some reason. You can reset the time zone with...
systemsetup -settimezone America/New_York # sets timezone to ET
I hope this helps.
Wayne
Posted on 11-07-2012 08:12 PM
You can also do this via MCX:
Domain: com.apple.MCX
Key Name: timeServer
Key Type: string
Value: time.apple.com
Posted on 11-07-2012 01:21 PM
You can run do this via shell script. There are just a few commands that you need:
systemsetup -setusingnetworktime on # this confirms that network time service is turned on
systemsetup -setnetworktimeserver time.apple.com # this sets the time server
and
ntpdate -u time.apple.com # this is the one that actually tells the date function to check in with the time server
I found that sometimes the timezone placeholder (/etc/localtime) gets corrupt for some reason. You can reset the time zone with...
systemsetup -settimezone America/New_York # sets timezone to ET
I hope this helps.
Wayne
Posted on 11-07-2012 01:24 PM
sudo systemsetup setusingnetworktime on
will set it to On. Just run that in a policy. There may be an MCX or profile function, but not sure.
Edit: Wayne beat me to it, and provided more info. So follow his post. :)
Posted on 11-07-2012 08:12 PM
You can also do this via MCX:
Domain: com.apple.MCX
Key Name: timeServer
Key Type: string
Value: time.apple.com