Enable location services on mac OS 10.15

user-SMgSrbMIOE
New Contributor

Hi

i am fairly new to jamf and mac. I need to activate the location service on several mac os x 10.15 (cf photo). Is it possible to authorize it from jamf? How?

Thank you

28a8f65ae5cf42898fa092632288d0e1

3 REPLIES 3

Phantom5
Contributor

I use this script from a Jamf Pro Policy

#
# Script Variables
# <------------------------ Insert your script variables below ------------------------>

# Set variable in Jamf Pro policy to either Yes or No
setLocationServices=$4

#
# Script Functions
# <------------------------ Insert your script functions below ------------------------>


#
# Core Script
# <--------------------------- Insert your main code below ---------------------------->

# Enable Location Services
if [ "$setLocationServices" == "Yes" ]; then
    locationServices=$(/usr/bin/defaults read /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd.plist LocationServicesEnabled)
    if [ "$locationServices" == "0" ]; then
        echo "Locations Services disabled"
        output=$(/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -bool true; /bin/launchctl kickstart -k system/com.apple.locationd 2>&1)
        echo "$output"
    fi
fi

exit 0

user-SMgSrbMIOE
New Contributor

Oh great. It seems to be working but I still can't allow localization for a specific app like firefox. Does it work with a script too? Because in pppc I don't see anything

user-SMgSrbMIOE
New Contributor

Hi,
It works with firefox but not with chrome. Has anyone ever managed to enable locate on chrome?
Thank you