I try the command shown above in Terminal, I get a long response, ultimately stating that Modifications can only be made in Recovery Mode. I boot up in recovery mode, try the command, it says command not found. Is there a workaround for this? Running Catalina if that helps. I also tried booting up using Command+R+S, which I understand puts me in single-user recovery mode. It appeared to have worked there, though I used two dashes instead of an en dash, and upon opening my Settings after rebooting, the command still had not worked.
sudo spctl –master-disable not working!
You should run that command from a normal boot (i.e. no Recovery Mode - it may be possible to locate the command in Recovery Mode by mounting the normal System Volume and run the executable using its absolute path, but I don't know that the command would work in the recovery environment).
Depending on the model of your Mac (e.g. T2), your security settings may be preventing you from running the command. In that case, first boot into Recovery Mode & adjust the security settings, then boot normally and enter the Terminal command.
Unfortunately, it seems that "Single User Recovery Mode" was removed from the firmware circa 2020, so that startup key combination no longer works. From what I can tell, it is now impossible to enter Single User Recovery Mode on any recent Mac.
i know this is over a year old but this seems to be a common question still. you might need a new terminal session do the sudo spctl --master-disable
with "--" instead of "-"
as long as a new terminal is in use, at least until high sierra you can just type in password and it should work, if it does not then open a new terminal session and try again. after it is successful go to settings-> securities and privacy and the option for run app from anywhere should be available
The command for macOS older than 10.15.7 has been updated to:
sudo spctl --master-disable
Source: https://medium.com/@ansonliao.xiao/how-to-enable-openanywhere-security-option-in-mac-09e1570aa9ac
It worked for me in October 2024.