restrict USB

Hi,

    How can i restrict use of USB in redhat. & also is it possible to allow USB devices for only specific devices or only few known penDrives......?

Thank you

Maybe try to comment out the services? Not sure about the second part.

USB devices are "linked" to the system using "udev" control scripts. /etc/udev contains all the scripts and rules that are processed when a new device is added to the system. You can do "man 7 udev" explains how it works. You might have something like this rule:

SUBSYSTEM=="usb_device"  OPTIONS=ignore_device

will completely disable all USB devices. Note, this rule has to come pretty early in the chain, so put it in the file 05-udev-early.rules. Anywhere, from there, you add exceptions (more rules) which match specific device drivers or device names.

Thanks for this, interesting, never have had to use this.

Modifying your udev scripts does not stop a knowledgable user from manually mounting a USB stick. It only stops the OS from automatically mounting the USB stick. You also need to ensure that users do not have permission to mount removable devices.