I am trying to deploy a policy that has the following script attached to it...
#!/bin/sh
sudo security authorizationdb write system.restart allow
sudo security authorizationdb write system.shutdown allow
Policy fails. If I send the exact same command out via Apple Remote Desktop, commands are successful.
I have a bunch of laptops that people often forget to sign out. So when the next user comes along and tries to shut the computer down, they get a pop up stating it needs admin credentials to shut down as there are other users logged in. I have tried to use the "Logout after XX idle time" but get pushback that there are times where only one person will be using the computer. Also, that script can be foiled if someone has left a document open to edit. Users are left to press and hold the power button to force the computer to shut off.
The script allows non-admin users to shutdown/restart the computer without admin credentials.







