Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
From @Elios on macadmins#python
import os
import pwd
from Foundation import CFPreferencesAppSynchronize
from Foundation import CFPreferencesSetValue
from Foundation import kCFPreferencesCurrentUser
from Foundation import kCFPreferencesCurrentHost
uid = pwd.getpwnam('_locationd').pw_uid
CFPreferencesSetValue('LocationServicesEnabled', True, '',
kCFPreferencesCurrentUser, kCFPreferencesCurrentHost)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment