Results 1 to 5 of 5

Thread: Disabling USB port on Linux

  1. #1
    Join Date
    Apr 2010
    Posts
    56

    Disabling USB port on Linux

    Hello friends, how could I disable the USB port in Red Hat Linux? I know whether how to disable USB drive on the Windows. In windows it can be done by setting the Registry Key that is : "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor\Start" , but how could I perform this task in Linux Operating System. I have been tasked with all USB ports on Red Hat servers for disabling it. But I was failing to get it. I am very new to Linux operating system. Please help what can I do to disable it. Thanks in advance.

  2. #2
    Join Date
    Jan 2008
    Posts
    3,388

    Re: Disabling USB port on Linux

    The one way of disabling the USB mass storage on Linux System is by changing the name of “/System/Library/Extensions/IOUSBMassStorageClass.kext" to something other. The functioning of this is to prevent any of the mass storage devices form showing up. I had tested it; it prevents the USB flash drive from the mounting. But for this there may be other kind of side effects. Remember to restart the system after doing performing this task, because the “kext” might be loaded already.

  3. #3
    Join Date
    May 2008
    Posts
    4,085

    Re: Disabling USB port on Linux

    When the USB storage drive is plug it automatically detects USB flash drive. We can easily disable USB storage device under any of the Linux distribution. The program named modprobe used for the automatic Kernel module loading and can easily be configured to not load the USB mass storage driver upon the demand. It will prevent the modprobe program form loading the USB storage module, but it will prevent other program from using the insmod program to load module manually. Type the following command: # echo 'install usb-storage : ' >> /etc/modprobe.conf.
    we can also remove USB storage driver: # ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
    # mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko /root.

  4. #4
    Join Date
    Nov 2009
    Posts
    1,416

    Re: Disabling USB port on Linux

    We can also disable USB drive in Linux from the system BIOS configuration option. Make sure that BIOS should have to protected from the password. Also we can get rid of all the USB devices by disabling support of Kernel for USB with the help of the GRUB option. Open grub.config or the menu.lst under the Debian or Ubuntu Linux system and append “nousb” to the kernel as follows:
    kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb.
    After doing this helpful task remember to save and close the file. By doing this restart your system.

  5. #5
    Join Date
    Nov 2009
    Posts
    1,292

    Re: Disabling USB port on Linux

    In Linux operating system it can be done very easily, by unloading the usb_storage module:
    modprobe -r usb_storage ( in the command line)
    If you want to make it permanent then you have to blacklist the module. It will prevent it from loading on reboot. Unload the usb_storage module, and then plug it in thumb drive. This will work for you.

Similar Threads

  1. Cannot do Port forwarding in Debian Linux
    By Echa in forum Networking & Security
    Replies: 6
    Last Post: 01-03-2012, 10:37 AM
  2. Replies: 10
    Last Post: 15-09-2011, 10:29 PM
  3. Opening port for Linux Samba for windows users
    By afidelino in forum Networking & Security
    Replies: 5
    Last Post: 10-03-2010, 09:19 PM
  4. Replies: 1
    Last Post: 02-03-2009, 11:15 PM
  5. Missing port types : local port and Standard TCP/IP port
    By NIcaBoy in forum Windows XP Support
    Replies: 3
    Last Post: 28-12-2006, 07:38 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,727,222,992.73093 seconds with 17 queries