Tuesday, July 26, 2011

How to disable USB in an Ubuntu(Linux) machine

Considering an organization data should be very secured and protected. So USB is very vulnerable physical issue with computer data. If we could block the USB access from the users we can protect data by the people that needed. We came up this were when we creating Virtusa LiveConnect(a customized Ubuntu OS). There was a requirement form my manger to disable USB from the OS, that going to deploy in the kiosk machines and in the a meeting rooms. According to the policies of the Company the USB ports should be closed to the users. So when I got this requirement I Google on it and found some valuable resources.

----This is where you should go for disable USB----


http://www.cyberciti.biz/faq/linux-disable-modprobe-loading-of-usb-storage-driver/

According to the link there are many methods that we can do this thing. But tried with the modprobe.conf file.

Actually I did was i created a file called modprobe.conf file inside the etc directory( root/etc ). Because modprobe file used for automatic kernel module loading and can be configured to not load the USB storge. Then i write this script on it and save the file as sudo.

install usb_storage logger "formatted message"

This works for me and another amazing thing happened that was I was afraid that this will disable my USB dongle but it wouldn't because it only disable USB storages. So if you are willing to disable your USB storage, try this. On the other hand you can protect your own Ubuntu machine from unknown USB storages.






1 comment:

  1. Nice post!This is going to be useful for many.Example is imagine you want to enable your user to connect to the internet using the usb dongle but do not want to enable them use USB and steal data! :)

    ReplyDelete