Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
~~~~~~~~~~~~~~ Sameer Shinde. M:- +91 98204 61580 Millions saw the apple fall, but Newton was the one who asked why.
2009/2/16 sameer shinde s9sameer@gmail.com:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
1. Remove any references to USB device (usually /dev/sdXY - check the output from dmesg while attaching USB device) from /etc/fstab. 2. Remove any sudo or root access for the user.
That should be the easiest way i guess.
Anurag
On Monday 16 Feb 2009 15:15:19 Anurag wrote:
2009/2/16 sameer shinde s9sameer@gmail.com:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
- Remove any references to USB device (usually /dev/sdXY - check the
output from dmesg while attaching USB device) from /etc/fstab. 2. Remove any sudo or root access for the user.
That should be the easiest way i guess.
Might as well blacklist the usb_storage module.
Mrugesh
On Monday 16 Feb 2009, Anurag wrote:
2009/2/16 sameer shinde s9sameer@gmail.com:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
- Remove any references to USB device (usually /dev/sdXY - check the
output from dmesg while attaching USB device) from /etc/fstab. 2. Remove any sudo or root access for the user.
I guess it could be done with HAL policy also (as long users do not have root access to the OS).
On Mon, Feb 16, 2009 at 9:20 PM, Arun Khan knura@yahoo.com wrote:
On Monday 16 Feb 2009, Anurag wrote:
2009/2/16 sameer shinde s9sameer@gmail.com:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
- Remove any references to USB device (usually /dev/sdXY - check the
output from dmesg while attaching USB device) from /etc/fstab. 2. Remove any sudo or root access for the user.
I guess it could be done with HAL policy also (as long users do not have root access to the OS).
How do I do it with HAL policy?
As per Anurag, I checked it for dev/sdXY, which is showing me as /dev/sdb1. How do I block /dev/sdb1 to the users, what if the device picked up other sdbX as /dev/sdb1 is not available?
I also checked in /etc/fstab but could not found any relevant entry in it. FYI - The users does not have admin privileges. It is just a standard linux desktop user.
any go ahed?
~~~~~~~~~~~~~~ Sameer Shinde. M:- +91 98204 61580 Millions saw the apple fall, but Newton was the one who asked why.
2009/2/17 sameer shinde s9sameer@gmail.com:
As per Anurag, I checked it for dev/sdXY, which is showing me as /dev/sdb1. How do I block /dev/sdb1 to the users, what if the device picked up other sdbX as /dev/sdb1 is not available?
I also checked in /etc/fstab but could not found any relevant entry in it. FYI - The users does not have admin privileges. It is just a standard linux desktop user.
If you have already commented out the devices your system assigns to usb disks - then you should be good to go. From what i know of the distros i've used, only a root/admin user can pick up arbitrary devices (which are not referenced in /etc/fstab) and mount them. Normal users cannot.
Anurag
Hi,
--- On Tue, Feb 17, 2009 at 1:15 PM, sameer shinde s9sameer@gmail.com wrote: | I also checked in /etc/fstab but could not found any relevant entry in it. --
With recent distros, you can use udev. For a start: http://www.reactivated.net/writing_udev_rules.html
Check udev.rules file (in /etc/udev/ in Debian, for example), or you can change the permissions in permissions.rules file. Just look for "usb" entries in these files.
SK
sameer shinde wrote:
On Mon, Feb 16, 2009 at 9:20 PM, Arun Khan knura@yahoo.com wrote:
On Monday 16 Feb 2009, Anurag wrote:
2009/2/16 sameer shinde s9sameer@gmail.com:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
- Remove any references to USB device (usually /dev/sdXY - check the
output from dmesg while attaching USB device) from /etc/fstab. 2. Remove any sudo or root access for the user.
I guess it could be done with HAL policy also (as long users do not have root access to the OS).
How do I do it with HAL policy?
As per Anurag, I checked it for dev/sdXY, which is showing me as /dev/sdb1. How do I block /dev/sdb1 to the users, what if the device picked up other sdbX as /dev/sdb1 is not available?
I also checked in /etc/fstab but could not found any relevant entry in it. FYI - The users does not have admin privileges. It is just a standard linux desktop user.
any go ahed?
As Mrugesh suggested, knock out the usb_storage module. You will find it using the lsmod command. You will find the man pages of lsmod and modprobe interesting.
sameer shinde wrote:
Hi All,
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
Some motherboard CMOS setups support this individual option. Check your CMOS setup.
On Mon, Feb 16, 2009 at 3:58 AM, sameer shinde s9sameer@gmail.com wrote:
Can anyone tell me, how do I disable usb storage in linux? I want just to disable usb storage, but usb keyboard / mouse should work in system.
Log into Gnome. System -> Administration -> Users and Groups
Click on the user -> Properties -> Privileges.
Uncheck -> Access external storage devices automatically.
That should do it.