LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-07-2012, 03:40 AM   #1
grando
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Rep: Reputation: 0
How to prevent all usb mass storages from mounting?


I want to prevent every kind of usb mass storage from mounting using udev rules. Already i can detect all of usb mass storages connected to my system using following rule:

SUBSYSTEMS=="scsi", SUBSYSTEM=="block" KERNEL=="sd[b-h]1"

But i don't know how can i prevent them from mounting!

I know i have to set the authorized file of its relevant usb device to zero! but how can i find the usb device path? the $DEVPATH gives me the path of storage device block for example sdb1!

thanks in advance.
 
Old 09-07-2012, 04:27 AM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,281

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Only root can mount. If other users also have that capability then you have installed some program which do it, for example pmount, usbmount, udisks. Just search which program do it and uninstall it or configure properly. I do not think that you can do that using udev.
 
Old 09-07-2012, 04:34 AM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Please clarify, do you want to prevent USB storage devices from mounting at all or just not automatically?
 
Old 09-07-2012, 04:51 AM   #4
grando
LQ Newbie
 
Registered: Nov 2009
Posts: 2

Original Poster
Rep: Reputation: 0
My purpose is that the normal users cannot access to the content of their usb mass storages! i mean every kind f usb mass storages should be blocked before mounting! then my own written application should give the permission to usb mass storages to mount.
P
 
  


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
[SOLVED] prevent of any kind of automatic USB mounting in LXDE Desktop cccc Debian 2 03-03-2012 09:08 PM
[SOLVED] thunar stopped to mount USB storages (Debian squeeze) kaz2100 Debian 11 09-27-2011 02:21 AM
mounting USB mass storage device with kubuntu5.10 ariel_w Linux - Hardware 5 04-26-2006 04:43 PM
Can't mount 2 usb-storages after one another on same port? furryspider Linux - Software 3 08-14-2004 03:03 PM
mounting usb mass storage device Joe47 Fedora 2 03-03-2004 07:58 PM

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

All times are GMT -5. The time now is 12:21 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