LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Kernel (https://www.linuxquestions.org/questions/linux-kernel-70/)
-   -   Disable/enable USB storage device @ run time (https://www.linuxquestions.org/questions/linux-kernel-70/disable-enable-usb-storage-device-%40-run-time-659723/)

Mr.J 08-01-2008 07:06 AM

Disable/enable USB storage device @ run time
 
I need to disable/enable USB storage device @ run time on ubuntu 7.1
Any Idea ?

PTrenholme 08-01-2008 08:05 AM

Can you provide more details? It's not clear to me what you want to accomplish.

The usual approach is to set up the udev rules for your USB devices so the system is "aware" of specific different USB devices that might be plugged in. If you sym-link a "logical" device name to an actual USB device, you can test for the presence of the "logical" device without worrying about where it actually plugged in.

But that may not be the problem you're trying to solve.

Mr.J 08-03-2008 06:20 AM

On one machine I need to allow only selected users to have access to USB storage devices.

PTrenholme 08-03-2008 08:14 AM

Set up a group to which you add only the users for whom you wish to permit USB access, and restrict such access to members of that group.


Look at man sudo ans man sudoers for pointers on how to set up privileged commands (like mount) so only selected groups can use them.

Note that your distribution may be using udev rules to automatically mount USB devices, or that the automatic mount is being handled by, for example, the desktop manager. If that's the case you may need a different method to implement the restriction.

You might find it helpful to look at fora specific to your distribution for discussions of security issues. Or to ask the moderator(s) to move this thread to the security sub-forum on LQ.

Mentioning your specific distribution might also be helpful . . .


All times are GMT -5. The time now is 09:25 PM.