How to disable only usb-storage in Centos 5.5?
Hi,
I'm using centos 5.5,my problem is that i need to disable usb-storage in my machine.But i need usb mouse and usb keyboard to function properly.I have tried all the below mentioned methods, 1.Appending blacklist-usbstorage to /etc/modprobe.d/bl* 2.removing the *.ko file,which removes the usb-storage drivers. 3.Added the line, install usb-storage /bin/true to /etc/modeprobe.conf The first mentioned method works partially.That is the usb port in the front panel of the cpu is gets disabled.But,when i insert it at the port behind the CPU, usb-storage(pendirve) mounts automatically,which should not happen. NOTE:usb-storage have to be disabled only for normal-users Thanks in advance |
Have you tried compiling the kernel without support for usb storage?
Code:
# CONFIG_USB_STORAGE is not set |
Disable only usb storage in linux...Solved
Hi,
Finally i got it right...so here is what i did.... 1.echo 'blacklist usb_storage' > /etc/modprobe.d/blacklist-usb_storage 2.echo 'modprobe -r usb_storage' > /etc/rc.local 3.reboot Now all usb_storage will be disabled except usb mouse and keyboard. Thanks Andrewthomas anyway....:;) |
not able to understand 1 & 2 steps
hai masterav can i have detailed explaination. what is happening in 1 & 2 commands?
|
#1 configures the modprobe utility to ignore the usb storage module - thus it will not be loaded if requested
#2 removes the usb storage module from the kernel. Without doing this it would take a reboot before the first command had any real effect - the module would still be loaded. That said, #2 shouldn't be needed as the first command is an on-disk configuration change. |
thank you jpollard. then how to enable usb storage after disable.
|
undo #1. delete the file "/etc/modprobe.d/blacklist-usb_storage"
If step #2 was also done, remove the command from /etc/rc.local (which could have other things in there. If not, just delete the file.) I believe once the file is deleted it would work, though it might require a reboot or restart of udev. |
All times are GMT -5. The time now is 08:27 PM. |