0

This question already has an answer here:

I want to disable USB access to root and enable it when it is required.

I need to restrict users to copy and paste anything using external drives.

Can anyone help me on this?

marked as duplicate by karel, Eric Carvalho, Fabby, Kevin Bowen, Charles Green Aug 25 '17 at 0:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Can you explain what you mean by “stranded user”? – dessert Aug 18 '17 at 13:56
  • I mean root user . – Manoj Singh Aug 18 '17 at 14:01
0
modprobe -r usb-storage

will remove the usb-storage module and thus disable every usb storage device on the system.

To disable usb storage devices permanently, blacklist the module with

echo "blacklist usb-storage" | sudo tee -a /etc/modprobe.d/blacklist.conf

(see here)

  • every time when i give this cmd , i got a FATAL error ."modprob :FATAL :Module usb_storage is in use ". – Manoj Singh Aug 18 '17 at 14:06
  • Well do you have usb storages attached? Try to remove them first. – dessert Aug 18 '17 at 14:16
  • If you also want to block it for root users, just rip out every usb slot not in use, this will block it for sure. ;) – dessert Aug 18 '17 at 14:23

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