Posted on 01-08-2020 01:08 PM
Hey JAMF Nation,
I was wondering if someone can point me in the right direction with establishing NTP servers on my machines in JAMF.
I've seen a few posts with scripts and I'm wondering if there was a specific payload available instead.
Any help is much appreciated!!
Posted on 01-08-2020 01:20 PM
@doreyme The scripts in the posts are your best bet. Just make sure to look for the most recent ones as things have changed over the years. I can't recommend any specific script as I've gone back to having my org's DNS alias time.apple.com to an internal NTP server so we don't change the default configuration any more.
Posted on 01-08-2020 01:35 PM
If you take /usr/sbin/systemsetup -setnetworktimeserver "time.apple.com"
and replace time.apple.com
with your desired NTP, you should be good. Just be sure to test before deploying to the masses.
Posted on 01-08-2020 03:40 PM
Thanks everyone!
@sdagley do you have an updated script by chance?
Posted on 01-08-2020 07:25 PM
Posted on 01-09-2020 09:48 AM
@sdagley so im assuming thats in the file and process payload?
Posted on 01-09-2020 11:10 AM
@doreyme The Files and Processes payload will work, or you can create a new script under Settings->Computer Management->Scripts (don't forget the #!/bin/sh
as the first line of the script in that case).
Posted on 01-09-2020 04:34 PM
Posted on 01-09-2020 10:35 PM
if you want to nail the time server, I'd recommend using a configuration profile instead. The keys and preference domains are stated in the config profile reference:
https://developer.apple.com/business/documentation/Configuration-Profile-Reference.pdf
Check out the "time server" payload.
The Time Server payload is designated by specifying com.apple.MCX as the PayloadType value.
This payload allows devices to connect to custom time servers.
In addition to the settings common to all payload types, the Time Server payload defines the following keys:
timeServer
timeZone
The ntp server to connect to.
Availability: Available in macOS 10.12.4 and later.
Time zone path location string in /usr/share/zoneinfo/. For example, ”America/Denver” or ”Zulu”.
Availability: Available in macOS 10.12.4 and later.
Posted on 01-10-2020 11:22 AM
@m.entholzner thanks for the reply.
Not entirely sure how to use a configuration profile for this instead. but i was planning on using a policy with the Files and Processes payload using this
sudo systemsetup -setusingnetworktime on -setnetworktimeserver time-a.nist.gov
Posted on 01-10-2020 03:56 PM
+1 on @m.entholzner's advice. In most instances, if you can use a profile to accomplish your desired task, it's the way to go. Profile Creator https://github.com/ProfileCreator/ProfileCreator appears to have the provisions in place for building a profile with time server info, but I haven't personally used the payload myself.
Posted on 01-13-2020 03:54 PM
Thanks Everyone!
Posted on 10-21-2020 04:39 AM
Hi all, just come across this as we have a PCI requirement that any Macs involved in PCI work need to point to a specific NTP server.
The 3rd Party App (ProfileCreator) mentioned can create a Config Profile with Time Server settings but importing it into our Jamf environment doesn't work (it imports the General Payload but the Time Server Payload is missing).
I'm going to write a script to run daily on the required Macs to point to the required NTP server:
#!/bin/sh
/usr/sbin/systemsetup -setusingnetworktime on -setnetworktimeserver (our PCI NTP Server)
That should cover it, right?
Posted on 10-21-2020 05:44 AM
That should work, but you should be able to make the Configuration Profile work. Did you sign the profile before you uploaded it? Sometimes that helps. (Also, did you apply the profile to a test machine after you uploaded it? Sometimes the Jamf GUI won't show profile settings that are not standard.
Also, if you have already created your Profile in profile creator, you could just export the Time Server payload as a PLIST (click and hold the export button and choose Export PLIST). You can then create a new profile in Jamf and upload that PLIST in the custom settings. Make sure the Preference Domains is com.apple.MCX
Posted on 10-21-2020 06:04 AM
@jay-kay To expand on what @RBlount said...
An Application & Custom Settings payload as he describes is the easiest solution.
As to why... Jamf Pro doesn't have a built-in editor for the Time Server settings, so if you upload a profile containing that payload you're not going to see it displayed in the GUI. That profile may still work, but to be sure you'd need to have ProfileCreator sign the profile when it's created so that when uploaded to Jamf Pro no modifications will be made to the payload(s).