MacOS – disable SIP on a remote/headless machine running Sierra

macossip

I have a remote 2012 mac mini running Sierra. Long ago I was doing some troubleshooting and had created a secondary copy of the system on the machine. Once I had finished whatever I was doing (which I don't even remember anymore) I got my working system running again and deleted the alternate one. Trouble is since it contains system files, they are locked down by SIP and can't be deleted without disabling SIP. Which of course can only be done from recovery mode, which requires having a display and keyboard attached to the machine in question. Which I don't have.

Is there any way to:

  1. Disable SIP without using recovery mode at all? I have found other threads (such as here and here) about this and the consensus appears to be "no", but I thought I would reiterate the question here to be thorough. Or,
  2. Empty the trash of protected items without having to disable SIP first?

The machine is running Sierra and SIP is definitely enabled currently (csrutil status).

Best Answer

Disable SIP without using recovery mode at all? I have found other threads (such as here and here) about this and the consensus appears to be "no", but I thought I would reiterate the question here to be thorough.

System Integrity Protection cannot be disabled from a normal mode boot (from ones's Desktop). The Apple provided method is to use csrutil disable from Terminal while booted to macOS Recovery. What good would it be if it could be disabled from a normal mode boot? (Rhetorical question!)

As mentioned by David Anderson in a comment, one could use rEFInd to disable SIP, however, this cannot be done from a normal mode boot (from ones's Desktop) and would require having rEFInd installed and rebooting the system to rEFInd, which you'd have no control of from a headless-system without a keyboard.

Empty the trash of protected items without having to disable SIP first?

From a normal mode boot (from one's Desktop), no, however one can delete the various .Trashes and .Trash directories from Terminal in macOS Recovery without disabling SIP and then reboot back to normal mode boot and those directories will be recreated.

What good would SIP be if one could bypass its restrictions from a normal mode boot? (Rhetorical question!)

Obviously, you'll need to temporarily add a keyboard and monitor to the Mac mini to boot to macOS Recovery in order to resolve the issue.