Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm admin for one of my college PC with 3 other normal users . If possible I want to restrict other 3 normal users from using USB. I'm using Ubuntu 12.04 .

share|improve this question
up vote 6 down vote accepted

You can disable USB storage device in Ubuntu, where only root users can only enable it. Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

gksudo gedit /etc/modprobe.d/blacklist.conf

enter image description here

When it opens add blacklist usb_storage as the last line, then with the command below open the rc.local file

gksudo gedit /etc/rc.local

When it opens, add modprobe -r usb_storage before the line exit 0

enter image description here

Now go ahead and reboot your system.

To mount, open a Terminal and use the following command.

sudo modprobe usb_storage

To Unmount the USB device, just right click on the device in file manager, and choose safley remove, or Unmount device, and run

sudo rmmod usb_storage

In Terminal.

Source: How to Disable and Enable USB Device

share|improve this answer
This disables USB storage system wide in a rather blunt fashion. This is really not the way to do it. Ubuntu uses group permissions for that (see my answer). – Paul Hänsch Oct 28 '12 at 8:53

To deny users permission to use USB storage, it should suffice to remove them from the group plugdev.

share|improve this answer
See the link "how to disable and enable USB Device" – Mitch Oct 28 '12 at 10:17
oh, i think modprobing around would be perfectly valid for disabeleing USB alltogether, which was the original question, admitted. But isn't the module usb_storage also only for usb volumes? Is i.e. a webcam disabled by removing usb_storage? (It stays operational with my method) – Paul Hänsch Oct 28 '12 at 13:40
Oh.. and well the link you posted, it is one method, yes, but a dull one. And it completely ignores modern distributions with polkit setup etc. – Paul Hänsch Oct 28 '12 at 13:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.