Posted on 12-19-2022 08:10 AM
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
Posted on 12-20-2022 06:39 AM
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>"
Posted on 12-20-2022 06:46 AM
Hi,
Thanks for the script. How do you run script during the enrolment. We use Jamf School.
Thanks
Posted on 12-20-2022 07:07 AM
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.
Posted on 01-17-2023 06:57 AM
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".
Posted on 01-17-2023 07:26 AM
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
01-20-2023 07:59 AM - edited 01-20-2023 08:01 AM
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.
Posted on 01-19-2023 01:46 PM
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.
Posted on 01-19-2023 01:51 PM
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.
Posted on 01-20-2023 07:56 AM
I would put in a support ticket for this. It has been successful for me so far.