V
V
VA2018-11-16 17:28:05
System administration
VA, 2018-11-16 17:28:05

How to disable USB (for mass storage) on Mac OS Sierra and above?

Good afternoon, how to disable / disable USB flash drives, disks and other drives in Mac OS Sierra?
Did it like this:

sudo kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext
sudo mv /System/Library/Extensions/IOUSBMassStorageClass.kext ~/backup
sudo touch /System/Library/Extensions/
sudo reboot

Got
Failed to unload com.apple.iokit.IOUSBMassStorageClass - (libkern/kext) kext is in use or retained (cannot unload)."

- I tried to rename IOUSBMassStorageClass.kext
- I changed the date of the /System/Library/Extensions/ folder - I did it
via kextunload -b com.apple.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2018-11-16
@alexxxst

Did you do csrutil disable first?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question