Block USB Storage in Ubuntu

You might also like

You are on page 1of 1

Method one

sudo chmod 444 /etc/media (It will block cdrom also)

To enable - sudo chmod 777 /etc/media

Method two

sudo nano /etc/modprobe.d/blacklist.conf (if this file is not there just create it)

add these line at the end of the file

blacklist usb_storage
blacklist uas

and save it.then

sudo nano /etc/rc.local


add thes lines before exit 0

modprobe -r usb_storage
modprobe -r uas

save and restart the machine....DONE.

You might also like