Skip to main content
Question

Network Time Server command


Forum|alt.badge.img+8

In the Network time server field I'm getting this "The systemsetup binary is not present on this machine." Looks like this is only on OS 10.11 Macs. I have a few 10.9 machines that are returning the right network time server info.

I'm thinking I need to change my terminal command I'm using to set the network time server address. I'm currently using "sudo systemsetup -setnetworktimeserver my.network.time.server.url"

Thanks!

5 replies

Forum|alt.badge.img+8
  • Contributor
  • 147 replies
  • April 19, 2017

@mnapier I can't answer why systemsetup isn't being found on your 10.11 systems, but as an alternative to editing the time server setting on your machines (which isn't possible for iOS devices) you might want to consider having your organization's DNS redirect time.apple.com to the IP address of my.network.time.server.url


Forum|alt.badge.img+1
  • New Contributor
  • 3 replies
  • April 19, 2017

@mnapier Can you use ntpdate?

I use sudo ntpdate -vu my.network.time.server.url to set the time server on my clients, so far haven't run into issues from 10.7 - 10.12.


Forum|alt.badge.img+26
  • Valued Contributor
  • 909 replies
  • April 20, 2017

I'm willing to share my script for this...I ran into a problem where a device off campus could not receive ntp from the authoritative server on campus for time. I was able to specify two servers with this script:

1#!/bin/bash
2
3#Primary Time server for Company Macs
4TimeServer1=<server address here>
5#Secondary Time server for Company Macs
6TimeServer2=<second server address here>
7
8# Set the primary network server with systemsetup -setnetworktimeserver
9# Using this command will clear /etc/ntp.conf of existing entries and
10# add the primary time server as the first line.
11/usr/sbin/systemsetup -setnetworktimeserver $TimeServer1
12
13# Add the secondary time server as the second line in /etc/ntp.conf
14echo "server $TimeServer2" >> /etc/ntp.conf
15
16exit 0

Now I know that this wasn't your primary problem, but note the syntax of setting the timer server for the second server. This method would work to set the time server for the primary as well. Not the other way around though...in my case systemsetup works but systemsetup command only can specify one server so I use the second command to specify the second one. Hope this helps someone.


Forum|alt.badge.img+8
  • New Contributor
  • 7 replies
  • March 1, 2018

Question: how does the system know when to use the second time server?


Forum|alt.badge.img+26
  • Valued Contributor
  • 909 replies
  • March 1, 2018

Honestly unsure...I'm guessing it tries to hit the primary and when it can't looks for a secondary. That is the design assumption I am making when I use it. If someone is in house, we want them to hit the domain controller for their time. Our domain controller is not available off the network though and people's clocks sometimes go weird so I make the second server time.apple.com


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings