Results 1 to 3 of 3

Thread: Ability to block USB devices eg Flash Drives/Mobile phones

  1. #1
    Join Date
    Jan 2019
    Beans
    1

    Question Ability to block USB devices eg Flash Drives/Mobile phones

    I'm wondering if anyone can point me in the right direction. I'm pretty new to Linux so would need this explaining to me.

    I have tried a few different ways to block usb devices (below) however, they just do not seem to work. I'm using a Lubuntu image and it is going to be used in an office where we prohibit the use of usb Flash Drives etc due to Data Protection. So the only way we would be able to use it is if we re-enable it via the Administrator account.

    https://www.tecmint.com/block-usb-st...ices-in-linux/
    https://askubuntu.com/questions/1539...-the-usb-ports


    Any help would be appreciated!

  2. #2
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,791

    Re: Ability to block USB devices eg Flash Drives/Mobile phones

    TIMTOWTDI - To block al removable devices I would try to put a spanner in the works, so that nothing can mount on /media. One way could-be to delete /media and make a file with the name media and make it immutable.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: Ability to block USB devices eg Flash Drives/Mobile phones

    Epoxy in the USB ports is the best solution.

    You can disable the usb-storage module. See https://www.cyberciti.biz/faq/linux-...torage-driver/ or other sources on the Internet for how to do this.

    In https://www.tecmint.com/block-usb-st...ices-in-linux/ they suggest renaming the kernel module. Did you try that, and it didn't work?

    Did you trying removing the module from the running kernel with "sudo rmmod usb-storage"? If you run "lsmod | grep usb" do you see the module listed?

    Code:
    lsmod | grep usb
    usb_storage            49361  1
    Last edited by SeijiSensei; January 31st, 2019 at 05:36 PM.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

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
  •