On a fresh kernel just echo it with zero. For example:
Search what we need to be turned off:
lsusb
This returns a list of devices:
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hubBus 001 Device 002: ID 0402:5602 ALi Corp. M5602 Video Camera ControllerBus 001 Device 003: ID 045e:0723 Microsoft Corp. LifeCam VX-7000 (UVC-compliant)
Change 1-6 to your device ports to be disabled:
cat /sys/bus/usb/devices/1-6/idProduct
This gives me
5602.
Now we've found it (to iterate search, change 1-6 to all your device ports), now just turn it off:
echo "0" > /sys/bus/usb/devices/1-6/bConfigurationValue
After making sure it works as desired, make it load every startup (for example, in
/etc/rc.local.)