Posted on 12-03-2019 05:45 AM
Does anybody know a script to unlock Energy Saver prefs for non-admins?
Posted on 12-03-2019 05:49 AM
Posted on 12-06-2019 10:46 AM
So I tried that command and it did not work. Tried this and same result. Does anybody have anything successfully working?
#!/bin/bash # Allows non-admin users to change energy saver settings. User needs to be in static user group "Allow Energy Saver Changes" /usr/bin/security authorizationdb read system.preferences.energysaver > /tmp/system.preferences.printing.plist /usr/bin/defaults write /tmp/system.preferences.energysaver.plist group everyone /usr/bin/security authorizationdb write system.preferences.energysaver < /tmp/system.preferences.energysaver.plist exit 0;
Posted on 12-06-2019 10:57 AM
This should unlock it the current logged in user.
#!/bin/bash security authorizationdb write system.preferences.sharing allow
Posted on 12-06-2019 02:19 PM
@rlandgraf That one-liner doesn't for for me. neither does
#!/bin/bash security authorizationdb write system.preferences.energysaver allow
any other suggestions?
Posted on 12-20-2019 02:14 PM
Unlocking Energy Saver Settings for Standard User
Also have been trying many things with no success for Catalina
Posted on 12-21-2019 12:40 AM
You need to allow access to "system.preferences" prior to "system.preferences.energysaver".
#!/bin/sh # unlock the sysprefs before unlocking specific panes: security authorizationdb write system.preferences allow # unlock energysaver: security authorizationdb write system.preferences.energysaver allow
Posted on 12-07-2022 06:36 AM
Tried this script and works like a charm. This will allow non-admin users to manage the Energy settings.
Posted on 08-26-2020 12:15 PM
@jaz I know you were trying to get this to work for the Security pane here back in 2018. Were you able to get it working? I run the command to allow system.preferences and then to allow system.preferences.security. If I use
security authorizationdb read for both then I see allow, but if I open to the Security and Privacy pane and try to unlock it with a non-admin user/password, it just bounces.
Posted on 08-27-2020 07:40 AM
I have a script I use that unlocks Date & Time, Energy Saver, Time Machine and Network as well as enables Location Services and Automatic Date & Time and Automatic Time Zone. You can check it out here:
It accounts for jamf so the first three variables are empty. Variable 4 can be used to run everything and variable 5 can be used to run individual scripts. For you you can run it with variable 5 set to "sysprefs" which should take care of it. Please give a try and let me know.
Posted on 03-17-2021 03:39 PM
Does anyone have a resource on how Energy Saver management has changed in Big Sur (as Battery)? Our users are Standard non-admin, and we have been employing the security authorizationdb write option to work around allowing them access to various system preferences. In Big Sur this seems to have changed, but I'm unsure if it's that it just can't be managed the same way, the preference name has changed, or something else is affecting the setting. FOr our enrolled and supervised devices, even administrator users cannot modify the Battery pane and get a "Your administrator has not give you access to this pane" display.
Posted on 12-06-2022 08:09 PM
# unlock the sysprefs before unlocking specific panes:
security authorizationdb write system.preferences allow
# unlock network setting:
security authorizationdb write system.preferences.battery allow