Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Force Date/Time Synchronization
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="jenfossi" data-source="post: 1326414" data-attributes="member: 223542"><p>(first time poster!)</p><p></p><p>I manage several hundred Macs (OSx10.6) that bind to AD. Many are having issues losing time synchronization to our AD time sync server. </p><p></p><p>Is there a way to to push out a login script (before user logs in) that will force time synchronization to our server or time.apple.com? 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.</p><p></p><p>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? </p><p></p><p>Sorry, new to scripting!</p><p></p><p>Here is the script I wrote:</p><p></p><p>#!/bin/sh</p><p># Turn on or off using network time.</p><p></p><p>systemsetup -setusingnetworktime on</p><p></p><p>#Primary Time server</p><p>TimeServer1=10.6.6.1</p><p>#Secondary Time server</p><p>TimeServer2=time.apple.com</p><p></p><p># Set the primary network server with systemsetup -setnetworktimeserver</p><p># Using this command will clear /etc/ntp.conf of existing entries and</p><p># add the primary time server as the first line.</p><p>/usr/sbin/systemsetup -setnetworktimeserver $TimeServer1</p><p></p><p># Add the secondary time server as the second line in /etc/ntp.conf</p><p>echo "server $TimeServer2" >> /etc/ntp.conf[/I][/I]</p></blockquote><p></p>
[QUOTE="jenfossi, post: 1326414, member: 223542"] (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 time.apple.com? 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: #!/bin/sh # Turn on or off using network time. systemsetup -setusingnetworktime on #Primary Time server TimeServer1=10.6.6.1 #Secondary Time server TimeServer2=time.apple.com # 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] [/QUOTE]
Verification
Name this item. 🍎
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Force Date/Time Synchronization
Top