Wednesday, 23 April 2014

How to Disable USB Storage on Linux.

If you administrating a small or large workstations running with Linux Desktops and want to disable the USB ports for security so that no one can copy the data via USB storage like - Pen Drive.
I am explaining the following steps to disable the USB port:

There are total three ways to do it:

1. By grub.conf:
Edit the grub.conf and add the following line (you need to login as root).

# vi /boot/grub/grub.conf

Then add the following lines on the right kernel version

kernel / vmlinuz <your-kernel-version> rhgb quiet nousb

save and exit the file and reboot the system to disable the USB ports and boot time.

2. Type the following command:

# echo 'install usb-storage :'>> /etc/modprobe.conf

you can also remove USB Storage driver, Enter:

# ls /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage-ko
# mv /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage-ko /root

3. Disable by BIOS:
Disable USB from system BIOS configuration option and make sure BIOS is password protected.

For any query please feel free to contact me my email id is sashwatkatore@gmail.com.

No comments:

Post a Comment