AuthorizationDB rule for Low Power Mode in MacOS Sonoma

lizzymiller
New Contributor II

I recently had a user complain to one of our technicians that the low power mode setting requires admin credentials to modify. A vast majority of the macs in our fleet are laptops, and I don't mind letting users change this setting on the fly. Looking into it online, most folks have said to allow system.preferences.energysaver, but it doesn't look like that is actually linked to the low power mode option at all. Is there another key I can use to modify the behavior of low power mode in the battery pane? Thanks.

7 REPLIES 7

user-rGXZvvXxwj
New Contributor II

Did you find a solution? We're having the same issue

Hi! I did not, but I just want to check in and let you know that WTTJanto appears to have offered a solution below this post. I haven't tested it yet, but it looks pretty promising. I wanted to alert you in case you aren't keeping up with this thread.

WTTJanto
New Contributor

Hey There

I'm using the following script in our environment and it doing the job fine

 

#!/bin/bash

# Unlock System Preferences for non admins
security authorizationdb write system.preferences allow
security authorizationdb write system.settings allow

# Unlock Energy Saver preference pane
security authorizationdb write system.preferences.energysaver allow
security authorizationdb write system.settings.energysaver allow

exit 0

Awesome! I'll that out.

cragsdale
New Contributor

When I try the above script, it not only unlocks the Battery/Energy Saver settings, it also unlocks all other settings in System Settings/System Preferences. If I remove the first two lines, users aren't able to unlock the Energy Saver settings. Anyone else. seeing similar behavior?

Andreas_Schenk
Contributor
Contributor

From my findings just now, using 
sudo security authorizationdb write system.preferences allow
sudo security authorizationdb write system.settings.energysaver allow
will give standard users the rights to modify the energy saver (battery) settings, nut not other authenticated stuff, like Date & Time or using hotspots in network settings.
The point might be that in Ventura and Sonoma the individual panes have a different naming as in previous systems.
Also somewhere else I found the hint that reverting one of theses settings can be done by writing the key "admin" instead of allow/deny.

When I tried this:

sudo security authorizationdb write system.preferences allow
sudo security authorizationdb write system.settings.energysaver allow

Standard users were able to change their Computers name under Settings\General\About which usually requires admin permissions.

I had to revert back by writing the key admin instead of allow