0

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?

Zanna
  • 70,465

1 Answers1

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)

dessert
  • 39,982