2

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).

11
  • 1
    The security behind SIP is that you can't disable it without u mounting the boot volume first and that requires direct "console" access. As to your second question, Trash isn't protected and as far as items covered by SIP, you simply cannot move then to the Trash. So, that's more of an issue. Can you expand on that issue rather than re-ask an already answered question?
    – Allan
    Sep 7 '20 at 15:41
  • @Allan I'm not sure what you mean that SIP-protected items cannot be moved to trash. They most certainly can... they just can't be emptied. I moved an entire System directory to the Trash, and most of it did in fact delete, but a handful of Library files refuse to delete, giving me "Some items in the trash cannot be deleted because of SIP"
    – JVC
    Sep 7 '20 at 15:45
  • I meant they can't be deleted. You did this with SIP enabled?
    – Allan
    Sep 7 '20 at 16:07
  • 1
    SIP shouldn't give a damn about files on a non-boot drive. They're not 'system files' they're just 'stuff on a drive'. Perms can be ignored too, so you should be able to do anything you like. If they can't be deleted it's because the current system thinks they belong to it.
    – Tetsujin
    Sep 7 '20 at 17:18
  • @Allan Yes they were moved to trash with SIP enabled. They were not the active system at the time, of course.
    – JVC
    Sep 7 '20 at 17:19
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.

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.

6
  • Thanks, adding a keyboard and display is clearly the only way to solve this then since Recovery mode is always required. Ah well, thanks again for the confirmation.
    – JVC
    Sep 7 '20 at 18:22
  • It is a minor point, but SIP can also be disabled using rEFInd. So booting to macOS Recovery is not the only way. Also, using rEFInd would not work on a Mac without at least a keyboard attached. Sep 7 '20 at 21:48
  • @David Anderson, In this particular use case it's a very minor point since it cannot be disabled from a normal mode boot (from one's Desktop) even with rEFInd, and it would also have to be installed separately as it's not a part of macOS. Sep 8 '20 at 0:19
  • The rEFInd Boot Manager can be configured to boot from a flash drive. The rEFInd Boot Manager does not require macOS. The rEFInd Boot Manager can also be configured to allow SIP to be enabled or disabled from rEFInd. If you know the correct key sequence, then you could disable SIP without the use of a monitor, but this would require a keyboard. Sep 8 '20 at 1:27
  • @David Anderson, It's totally irrelevant from where you run rEFInd as it still has to be installed, it's not a part of macOS and cannot disable SIP from normal mode boot of macOS. That said, in this particular case SIP does not even need to be disabled as the files/folders can be deleted by deleting 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. So rEFInd isn't even need here. Sep 8 '20 at 1:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .