Hi,
Location service is running and detecting correctly London/Europe. However the time still set to UTC. I cannot see any obvious payload in JamfSchool to update the time to London/Europe. Any other alternatives to set it up please?
Thanks
Hi,
Location service is running and detecting correctly London/Europe. However the time still set to UTC. I cannot see any obvious payload in JamfSchool to update the time to London/Europe. Any other alternatives to set it up please?
Thanks
if on macOS I run this during enrollment
#!/bin/zsh
# Enable Location Services script
# Find the device UUID
uuid=$( /usr/sbin/ioreg -d2 -c IOPlatformExpertDevice | /usr/bin/awk -F\\" '/IOPlatformUUID/{print $(NF-1)}' )
# Enable macOS Location Services
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 1
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1
# Set date and time automatically
/usr/bin/defaults write /Library/Preferences/com.apple.timezone.auto Active -bool YES
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeOnlyEnabled -bool YES
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeZoneEnabled -bool YES
# Force time zone and time sync
/usr/sbin/systemsetup -setusingnetworktime on
/usr/sbin/systemsetup -gettimezone
/usr/sbin/systemsetup -getnetworktimeserver
# Restart Location Services daemon
/usr/bin/killall locationd
exit 0
With the below EA
#!/bin/zsh
LocationServicesEnabled=$( /usr/bin/defaults read /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled )
[ "$LocationServicesEnabled" = "1" ] && echo "<result>Enabled</result>" || echo "<result>Disabled</result>"
if on macOS I run this during enrollment
#!/bin/zsh
# Enable Location Services script
# Find the device UUID
uuid=$( /usr/sbin/ioreg -d2 -c IOPlatformExpertDevice | /usr/bin/awk -F\\" '/IOPlatformUUID/{print $(NF-1)}' )
# Enable macOS Location Services
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 1
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.$uuid LocationServicesEnabled -int 1
# Set date and time automatically
/usr/bin/defaults write /Library/Preferences/com.apple.timezone.auto Active -bool YES
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeOnlyEnabled -bool YES
/usr/bin/defaults write /private/var/db/timed/Library/Preferences/com.apple.timed.plist TMAutomaticTimeZoneEnabled -bool YES
# Force time zone and time sync
/usr/sbin/systemsetup -setusingnetworktime on
/usr/sbin/systemsetup -gettimezone
/usr/sbin/systemsetup -getnetworktimeserver
# Restart Location Services daemon
/usr/bin/killall locationd
exit 0
With the below EA
#!/bin/zsh
LocationServicesEnabled=$( /usr/bin/defaults read /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled )
[ "$LocationServicesEnabled" = "1" ] && echo "<result>Enabled</result>" || echo "<result>Disabled</result>"
Hi,
Thanks for the script. How do you run script during the enrolment. We use Jamf School.
Thanks
Hi,
Thanks for the script. How do you run script during the enrolment. We use Jamf School.
Thanks
I have it set to a custom trigger and it calls that on our main enrollment script. I use Jamf Pro so I'm unsure on Jamf School.
I have a group called "Incorrect Time Zone". Any device not on the correct time zone gets flagged. Then I apply to that group every so often the correct time zone. This can be done in the Devices tab under "More".
I have a group called "Incorrect Time Zone". Any device not on the correct time zone gets flagged. Then I apply to that group every so often the correct time zone. This can be done in the Devices tab under "More".
How did you filter device group with incorrect time zone? How do you apply correct time zone in Jamf School? I cannot see any obvious option.
Thanks
You need a smart group "Incorrect Time Zone". (Rule: Time Zone - not one of the following)
This Group can be displayed in the device list. You have to expand the filter option (in the old UI) first column has an entry: member of. Here you have to type in your group name (Incorrect Time Zone).
The new filtered device list entrys need to be selected. and with a bulk action: More -> Change Time Zone, the time Zone can be set.
In the new device list UI you the Filter can be set in the general Tab in Device Group. The Bulk action is also in the More dropdown list.
You need a smart group "Incorrect Time Zone". (Rule: Time Zone - not one of the following)
This Group can be displayed in the device list. You have to expand the filter option (in the old UI) first column has an entry: member of. Here you have to type in your group name (Incorrect Time Zone).
The new filtered device list entrys need to be selected. and with a bulk action: More -> Change Time Zone, the time Zone can be set.
In the new device list UI you the Filter can be set in the general Tab in Device Group. The Bulk action is also in the More dropdown list.
But in my tests the time zone doesn't get changed.
The action gets Acknowledged but the time zone keeps the same US/Pacific.
Did it multiple times (10 am and 11pm) nothing changed.
But in my tests the time zone doesn't get changed.
The action gets Acknowledged but the time zone keeps the same US/Pacific.
Did it multiple times (10 am and 11pm) nothing changed.
I would put in a support ticket for this. It has been successful for me so far.
How did you filter device group with incorrect time zone? How do you apply correct time zone in Jamf School? I cannot see any obvious option.
Thanks
I created a device group with the filter:
Then after I can search by that group and find all the devices that aren't the correct time zone. After that I can apply the correct time zone to the device.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.