Davide Biasco
Davide Biasco

Reputation: 31

Mac Os X 10.10 Yosemite disable usb ports

I am struggling to disable USB ports on macs with the new Yosemite

My original intention was to give read only access to USB drives but it seems impossible, so I decided to go for the complete removal of the USB access

I followed the instructions on the osX manual but won't work

I tried this, posted here in the forum: link but it won't work

What I get now is this error link

(kernel) Can't remove kext com.apple.iokit.IOUSBMassStorageClass; services failed to terminate - 0xdc008018.

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

It may be because I removed the file from the extensions folder first, but if that was the case, why usb is still working? Hope you can help somehow.

Cheers

Upvotes: 3

Views: 4325

Answers (3)

Patrick Duffy
Patrick Duffy

Reputation: 1

You need to unload the AppleUSBCardReader and AppleUSBODD drivers as they load IOUSBMassStorageClass. Run the following commands in the terminal:

sudo kextunload -b com.apple.driver.AppleUSBCardReader <br>
sudo kextunload -b com.apple.driver.AppleUSBODD <br>
sudo kextunload -b com.apple.iokit.IOUSBMassStorageClass

Upvotes: 0

GMZ
GMZ

Reputation: 1

I'd like to improve the previous answer but I cannot comment on it, so I will add it here.

I am having the same problem and to solve it I confirm that you should unload the driver with

kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext/

In order to keep this setting at reboot, I added a call to the root crontab (since this won't be modified by updates nor other users)

to become root

sudo su -

modify root crontab

crontab -e

add the line to the file and close it

@reboot kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext/

I hope this helps

Upvotes: 0

Steve
Steve

Reputation: 11

Unload it first with

kextunload /System/Library/Extensions/IOUSBMassStorageClass.kext/

However having said that removing and even deleting this kext in Yosemite doesn't seem to prevent USB working again on reboot. In fact you now lose the ability to unload the kernel extension once loaded.

Upvotes: 1

Related Questions