0

I want to change the selection of "Allow applications downloaded from :" to anywhere via terminal.

enter image description here

Thanks!!

Jeremy
  • 8,902
  • 2
  • 36
  • 44
YU FENG
  • 888
  • 1
  • 12
  • 29
  • All the preference panes should dump their contents to a set of plists stored in ~/Library/Preferences. Not sure about the secure preferences like this. – CodaFi Jul 18 '13 at 02:11

1 Answers1

2

These 3 settings are a combination of a big on/off switch and the system policy database. These settings affect the syspolicyd, and how it interacts with the system.

The 'master on/off' switch can be configured using the spctl command line tool. Managing these settings requires administrator privileges. To turn it off you use:

sudo spctl --master-disable

To enable it you use:

sudo spctl --master-enable

To check if it's in on/off you use

spctl --check-status

The App Store vs. Identified Developers option is controlled by the content of the database. Rules get enabled/disabled based on this setting. I don't know the exact format of the database (I spent a short time reverse engineering it, but didn't care enough to follow it through), and I'm sure that Apple could change it between releases, so knowledge gained about the format would need to be relearned between releases.

It's probably not the answer you're looking for, but it seems to be how it's implemented in the system.

Anya Shenanigans
  • 91,618
  • 3
  • 107
  • 122