Does anybody know a script to unlock Energy Saver prefs for non-admins?
Thanks,
Jared
Does anybody know a script to unlock Energy Saver prefs for non-admins?
Thanks,
Jared
Have a look here.
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;
This should unlock it the current logged in user.
#!/bin/bash
security authorizationdb write system.preferences.sharing allow
@rlandgraf That one-liner doesn't for for me. neither does
#!/bin/bash
security authorizationdb write system.preferences.energysaver allow
any other suggestions?
Unlocking Energy Saver Settings for Standard User
Also have been trying many things with no success for Catalina
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
@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.
Hello there,
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:
https://github.com/joshua-d-miller/admin-scripts/blob/master/DEP Enrollment/Enrollment.py
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.
Thanks!
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.
#!/bin/sh
# unlock the sysprefs before unlocking specific panes:
security authorizationdb write system.preferences allow
# unlock network setting:
security authorizationdb write system.preferences.battery allow
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
Tried this script and works like a charm. This will allow non-admin users to manage the Energy settings.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.