Force Date/Time Synchronization

Nov 15, 2011
Reaction score
(first time poster!)

I manage several hundred Macs (OSx10.6) that bind to AD. Many are having issues losing time synchronization to our AD time sync server.

Is there a way to to push out a login script (before user logs in) that will force time synchronization to our server or Currently when Mac's lose the time sync, the user can't login. I then have to login as administrator, check the box to sync time and then all is well.

I have a UNIX command I created that does what I want, but not sure how to push the command out to all users. We use Xserver (workroup manager) to push out settings, can I push out a login script from there? If so, how do I save the .txt document with the UNIX command?

Sorry, new to scripting!

Here is the script I wrote:

# Turn on or off using network time.

systemsetup -setusingnetworktime on

#Primary Time server
#Secondary Time server

# Set the primary network server with systemsetup -setnetworktimeserver
# Using this command will clear /etc/ntp.conf of existing entries and
# add the primary time server as the first line.
/usr/sbin/systemsetup -setnetworktimeserver $TimeServer1

# Add the secondary time server as the second line in /etc/ntp.conf
echo "server $TimeServer2" >> /etc/ntp.conf[/I][/I]

Shop Amazon

Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.