Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

In a work environment, I'm trying to "lock down" a mac computer so that files can't be transferred via USB storage device.

Problem is, keybord and mouse are plugged in through USB, but I would still need those enabled, plus the keyboard has two more USB ports on either side. I could use a bluetooth mouse and keyboard to get around that, but then how can I disable the USB ports (And later re-enable with admin access)?

Or is there a way to limit the amount of data sent to/from as USB port? A keyboard and mouse wouldn't use that much, so then anything every X bytes/sec would get blocked? I'm not sure what the solution is here.

share|improve this question
    
Are you using any sort of managed preferences? Well worth investigating if you aren't, much finer control over this and tons of other areas without getting into modifying the core OS. –  da4 Jul 30 '12 at 22:36
add comment

2 Answers 2

up vote 2 down vote accepted

I think what you want to do is prevent the connection of USB Mass Storage Devices.

I found this answer which is untested by me and not terribly recent, but I can see that the referenced kext is still in the location described:

a quote from the Leopard security configuration guide:

48 Chapter 3 Protecting the System Through Hardware

Removing USB Support Software

Use the following instructions to remove USB mass storage device input/output support such as USB Flash drives and external USB hard drives. The removal of this kernel extension only affects USB mass storage devices. It does not affect other USB devices such as a USB printer, mouse, or keyboard. This task requires you to have administrator privileges. Important: Repeat these instructions every time a system update is installed. To remove kernel extensions for specific hardware:

  1. Open the /System/Library/Extensions folder.
  2. To remove support for USB mass storage devices, drag the following file to the Trash: IOUSBMassStorageClass.kext
  3. Open Terminal and enter the following command: $ sudo touch /System/Library/Extensions The touch command changes the modified date of the /System/Library/Extensions folder. When the folder has a new modified date, the Extension cache files (located in /System/Library/) are deleted and rebuilt by Mac OS X.
  4. Choose Finder > Secure Empty Trash to delete the file.
  5. Restart the system.

Source: https://discussions.apple.com/thread/2105022?start=0&tstart=0

share|improve this answer
2  
This doesn't work anymore on newer OSs. –  Steve Robbins Oct 1 '12 at 18:11
1  
I can confirm this doesn't work with Mountain Lion. Disabling the kext still allows the drive to be mounted manually via terminal. –  bunnyDrug Aug 2 '13 at 12:51
add comment

The following comment of mine has been deleted but I write it again because I think it can be useful for some people.

"Even though deleting the Kernel Extension does not work anymore on Mountain Lion, what still works is to open a Terminal window and issue a kextunload of the same extension: no USB mass storage volume will be mounted until the next restart."

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.