Terminal Command for system preferences

Hi,


I am looking for a terminal command that will lock the system preferences pane of "system preferences" > "security & privacy" > "privacy" > "Screen Recording".


I have found some commands online but not sure how to translate/interpret them for this specific task.


example:

/usr/bin/security authorizationdb read system.preferences > /tmp/system.preferences.plist

/usr/bin/defaults write /tmp/system.preferences.plist group everyone

/usr/bin/security authorizationdb write system.preferences < /tmp/system.preferences.plist


Anyone able to help?

Posted on Mar 23, 2022 1:45 PM

Reply
Question marked as Top-ranking reply

Posted on Mar 24, 2022 2:02 PM

Thank you for sharing the link.


Notation the Date of said article is posted on May. 23, 2017


That would be relevant for maybe High Sierra macOS 10.13.


Five years have passed since that time including and starting in Catalina macOS 10.15 where Apple has hardened the Volume containing the Operating System making that volume Read Only. Effective Not Allow changes to take place.


Further refinements were brought in with Big Sur macOS 11 where that same Read Only Volume was further Harden to a Sealed and Read Only Volume which is Sealed Key Protection (SKP).


This is continued in Monterey macOS 12 and effectively Eliminating the user from making any changes as Only Apple can perform this action


Therefore - it is suggested that the Terminal commands to effect the changes you have outlined earlier ,can not be done.


Similar questions

5 replies
Question marked as Top-ranking reply

Mar 24, 2022 2:02 PM in response to concerneduser98

Thank you for sharing the link.


Notation the Date of said article is posted on May. 23, 2017


That would be relevant for maybe High Sierra macOS 10.13.


Five years have passed since that time including and starting in Catalina macOS 10.15 where Apple has hardened the Volume containing the Operating System making that volume Read Only. Effective Not Allow changes to take place.


Further refinements were brought in with Big Sur macOS 11 where that same Read Only Volume was further Harden to a Sealed and Read Only Volume which is Sealed Key Protection (SKP).


This is continued in Monterey macOS 12 and effectively Eliminating the user from making any changes as Only Apple can perform this action


Therefore - it is suggested that the Terminal commands to effect the changes you have outlined earlier ,can not be done.


Mar 23, 2022 2:05 PM in response to concerneduser98

What the user ( you ) have provided above are not Terminal command


They are the Location path for the files.


Is there a specific reason for wanting to Lock only certain aspects of System Preferences while leaving the remainder not locked.


AFAIK and stand to be corrected by Other Contributors - what is being asked for is not normally possible.


EDITED

Mar 23, 2022 2:06 PM in response to Owl-53

From the article I read, it seems as though it is the beginning of the terminal command.

This below was included as well. -> it is a command that allows the printer settings pane to be open to all users. I am looking to lock the screen recording settings pane for the standard users.



/usr/bin/security authorizationdb read system.preferences.printing > /tmp/system.preferences.printing.plist

/usr/bin/defaults write /tmp/system.preferences.printing.plist group everyone

/usr/bin/security authorizationdb write system.preferences.printing < /tmp/system.preferences.printing.plist

/usr/sbin/dseditgroup -o edit -n /Local/Default -a “everyone” -t group lpadmin



This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Terminal Command for system preferences

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.