Q Our students need to use Macs with devices connected to their USB ports, but we want to prevent them from accessing USB memory sticks or pen drives. Is there any way to do this without using glue?
A You are wise to avoid gluing USB connectors into the ports on your Macs, which would cause support problems in the future.
This limits you to a software solution, which inevitably requires that your students do not have administrative status on their Macs: if they do have the ability to access the System folder, they could circumvent or reverse your security.
The preferred method for disabling connected USB storage devices of all types is to move the file at /System/Library/Extensions/IOUSBMassStorageClass.kext into another folder, perhaps named Extensions (Disabled), and restart. As this is a Kernel Extension, it could possibly have undesired side-effects, but should achieve your aim better than anything else.
You can achieve the same effect using the Terminal command
cd /System/Library/Extensions/ sudo kextunload IOUSBMassStorageClass.kext
although this will be reversed following a restart.
An alternative might be to capitalise on the fact that USB memory sticks use MS-DOS FAT file systems, so moving /System/Library/Filesystems/msdos.fs to another folder and restarting should prevent them from mounting, unless someone has been clever and used a different format.
OS X Server can also perform this for its managed clients, but turning all your classroom Macs into managed clients might be a bridge too far, perhaps.
Updated from the original, which was first published in MacUser volume 26 issue 12, 2010.