Sunday, 21 July 2013

Disable usb drives in Windows and Linux

Leave a Comment
There are many reasons due to which you may want to disable the USB drive such as virus attacks in windows, in exam to stop students from using USB drives. We can use following method to stop users other than administrator from using USB drive.

Disable USB Drive in Window

Step 1:  click Start->Run
Step 2:  in Run windows type regedit. Regedit is a graphical view for all configuration information about the inbuilt and installed software in windows.

Step 3: In regedit select the path as   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR


Step 4: In this select the Start file after this select Hexadecimal base, by default it is blank now enter 4 in the value data field and click OK and close regedit and your USB drives gets disabled. If you want to enable USB drive again then open this file, delete the value and keep it blank.


Disable USB Drives in Linux

Step 1: First check the kernel release of your current kernel OS because one operating system may have many versions of kernel. When we update Linux it keeps older version of kernel we can find current kernel version using uname -r command use  
kernel_version=$(uname -r) 
command so that you can use kernel_version variable for our next purpose.

Step 2: Enter following command using root privileges
mv /lib/modules/kernel_version/kernel/drivers/usb/storage
/lib/modules/Kernel_version/kernel/drivers/usb/storage_old
this command is used to change the name of storage directory to storage_old which disable the USB drive. If you want to access the USB drive again, change the name of this storage_old directory to storage again using root privileges.

0 comments:

Post a Comment