I have been searching a solution on how to disable the USB ports on Mac mini to prevent data copy to external USB mass storage devices. Precisely, my purpose is not to let Mac mini read/write data from/into USB devices.
According to this post ,kextunload command could be employed to accomplish this task in previous versions such as Sierra.
The problem that made me mad is there is only IOUSBMassStorageDriver.kext, but not IOUSBMassStorageClass.kext existing in /System/Library/Extensions/ directory.
In addition, after running
sudo kextunload -b com.apple.iokit.IOUSBMassStorageDriver,
the below error keeps occurring.
(kernel) Can't remove kext com.apple.iokit.IOUSBMassStorageDriver; services failed to terminate - 0xdc008018. Failed to unload com.apple.iokit.IOUSBMassStorageDriver - (libkern/kext) kext is in use or retained (cannot unload).
Anyone got any ideas? I really need help from this community.