I am attempting to enable the "Require an Administrator password to access system-wide preferences" using the script provided by ndeal, but when I run it, i receive an error that "shared" does not exist. Has anyone else gotten this to work in Mojave?
@nelsoni I struggled with this as well. @rtrouton is usually a very reliable an helpful source, but I could not get this to work in macOS 10.13 or 10.14. I tried it with the default command as well as PlistBuddy. I did not get any errors with the defaults command, but I also did not get any results. When I tried PlistBuddy I kept getting an error stating that the shared key did not exist. In the end I went back to the security man page and tried the example that was listed there (see below). This appears to take effect almost instantly. I say almost because though you do not have to reload System Preferences, you do have to reload that Pref Pane to see the box checked. I have not found any caveats to setting it this way. Please let me know if you do.
authorizationdb remove <right-name> Read/Modify authorization policy database. Without a rulename write will read a dictionary as a plist from stdin. Examples security> security authorizationdb read system.privilege.admin > /tmp/aewp-def Read definition of system.privilege.admin right. security> security authorizationdb write system.preferences < /tmp/aewp-def Set system.preferences to definition of system.privilege.admin right.