Prevent Gatekeeper from auto-enabling in OS X

GateKeeperIconXGatekeeper is an execution prevention technology in OS X that will block apps from running if they have not been properly certified. It combines with similar technologies in OS X such as quarantining of downloaded files, to give you ample warning that a program you are running may be suspicious if it has not come from vetted sources, such as the App Store.

While it is a great option for most users to keep enabled by default, there may be times when you might wish to keep Gatekeeper disabled. These may be for special cases where developers create software, especially with developer tools besides Apple’s, or where a user might need to run numerous open source software packages.

Disabling Gatekeeper is relatively easy by authenticating and clicking “Anywhere” in the Security & Privacy system preferences; however, you may find that after a month, such settings will revert and OS X will re-enable Gatekeeper.

Again in the vast majority of cases, this behavior is great for security and since in most cases you may only need to disable Gatekeeper temporarily, it being re-enabled will likely go unnoticed. Furthermore, you can always re-visit the Security system preferences to change Gatekeeper’s settings, if needed. However, if you wish to always have Gatekeeper disabled, then you can do so by running the following command in the OS X Terminal:

sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO

This will write a hidden setting to Apple’s security preferences to prevent the disabling of Gatekeeper. You may need to reboot your Mac for these settings to take effect, and then Gatekeeper will stay disabled indefinitely.

If you wish to undo this setting, then you can run the following command to remove the change made by the previous command:

sudo defaults delete /Library/Preferences/com.apple.security GKAutoRearm

5 thoughts on “Prevent Gatekeeper from auto-enabling in OS X

  1. Jim Chaffin

    “Any GUI application to do it?” Sure! Download, install, and use Pathfinder as a replacement for Finder. You’ll gain several improvements, but the one you will use is adding a Terminal window on the bottom of a Pathfinder display! 😉

    Now, when Mr. Kessler offers us a Terminal command, just Copy it from your browser and Paste it into the Terminal portion of the Pathfinder window. Press return and the command is executed. And you didn’t even open, much less look for Terminal!

    I would also highly recommend making a collection (a simple text file should suffice) with the reason for the command, the command, and how to reverse it.

  2. Barry Marshall (@RunninonemptyAB)

    Seems that there has only been one app I wanted to install that Gatekeeper wouldn’t install for me but I have got use to not using it, but Apple could help out by giving us an option of putting all folder on top in Preferences if they they had the courage, but I am not going to hold my breath.

  3. B. Jefferson Le Blanc

    Typo alert: “sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO
    This will write a hidden setting to Apple’s security preferences to prevent the disabling of Gatekeeper.”

    I think you mean “prevent the enabling of Gatekeeper.”

  4. imgur

    When you make a website, all your web pages are served from the server residing somewhere on the internet.
    They offer so many extras that make starting up a new website so simple that even a complete
    novice could get a website up and running.
    The laws have been changing and many portals that offer
    services are finding it harder and harder to get their word
    out there.

Comments are closed.