LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-01-2008, 07:06 AM   #1
Mr.J
Member
 
Registered: Jun 2008
Posts: 82

Rep: Reputation: 15
Disable/enable USB storage device @ run time


I need to disable/enable USB storage device @ run time on ubuntu 7.1
Any Idea ?
 
Old 08-01-2008, 08:05 AM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.
 
Old 08-03-2008, 06:20 AM   #3
Mr.J
Member
 
Registered: Jun 2008
Posts: 82

Original Poster
Rep: Reputation: 15
On one machine I need to allow only selected users to have access to USB storage devices.
 
Old 08-03-2008, 08:14 AM   #4
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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 . . .
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB drive not working properly, read only device? (USB key storage device) Arodef Linux - Hardware 14 01-01-2010 07:32 AM
How to disable USB Mass Storage device ( usb drive ) in Linux vijaush Linux - Newbie 4 06-25-2008 09:43 AM
Is it possible to disable power supply to an USB storage device when unmounting? costavi Linux - Hardware 2 11-14-2006 03:23 AM
Assign one USB-storage device to one device file Misel Linux - Hardware 1 08-28-2004 03:52 AM
how can I mount this device: da0: <USB 2.0 Storage Device alkad_mzu *BSD 2 11-15-2003 06:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 05:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration