Monday, January 23, 2012

How To Disable Linux USB Drive

For security’s sake, IT auditor and security team normally request system administrator to disable or turn off USB mass storage device to minimize risk of data theft.

Now, let’s see how to disable USB mass storage device on Redhat Linux (RHEL 5.2 particularly; should be applicable to other Linux distributions too):
  1. Login as root,
     
  2. Open /etc/modprobe.d/no-usb for edit (create this file if it’s not exists),
     
  3. Append this line to the no-usb file (in step-2) and save it:
    install usb-storage /bin/true 

Reboot server to enforce change. To confirm USB mass storage support has disabled, just execute lsmod | grep -i usb or try plug in USB drive to confirm.