LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-16-2009, 03:18 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
disable automounting


I want to disable automounting of removable media such as anything on USB, memory cards, and even eSATA. I do want the device node to be set up, but that's it.
 
Old 07-16-2009, 05:02 PM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
On Ubuntu 6.10 there was a System -> Preferences -> Removable_Drives_And_Media that allows you to set that on a per user basis. (TMK, hot plugged devices will not automount unless somebody is logged in at the GUI.) I would imagine the current versions of Ubuntu would have something similar. Enforcing that system wide ... that might take a little more digging.
 
Old 07-16-2009, 08:59 PM   #3
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684

Original Poster
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
When I need to be sure devices are not automounted, I will be doing things via text console (e.g. Ctrl+Alt+F1) anyway. So I could just not log in to the GUI. But there is a catch. I need to have the wireless network running. So this would work if I can get the wireless network to autostart w/o any user logged in (something others have asked for, too, and for which I've not yet seen an answer).
 
Old 07-17-2009, 05:01 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Hello Skaperen

It may be possible by changing /etc/hal/fdi/policy/preferences.fdi. The following stops all automounting.

Code:
<!-- 
Prevent automount 
--> 

  <device> 
    <match key="storage.policy.should_mount" bool="true"> 
      <merge key="storage.policy.should_mount" type="bool">false</merge> 
    </match> 
    <match key="storage.automount_enabled_hint" bool="true"> 
      <merge key="storage.automount_enabled_hint" type="bool">false</merge> 
    </match> 
      <match key="storage.media_check_enabled" bool="true"> 
        <merge key="storage.media_check_enabled" type="bool">false</merge> 
    </match> 
      <match key="volume.policy.should_mount" bool="true"> 
        <merge key="volume.policy.should_mount" type="bool">false</merge> 
    </match> 
      <match key="volume.ignore" bool="false"> 
        <merge key="volume.ignore" type="bool">true</merge> 
    </match> 
  </device>
I don't know what effect that has on the device node or what you need to do to make the changes effective; for what I wanted a reboot was good enough. The hald man page suggests it's OK (if a little more complex than usual) to restart hald on a running system.

Best

Charles
 
  


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
How to disable automounting in SLAX? Albo74 Linux - Newbie 1 03-21-2009 04:41 PM
how to disable Text-to-speechmanager on startup, and disable fsck after 20 boots Kristian2 Slackware 2 02-25-2009 10:55 AM
dbx command for corrosponding commands disable or disable on gdb bshankha AIX 0 09-26-2006 09:38 AM
what are the services i can disable, also disable ads, banners in konqueror? greythorne SUSE / openSUSE 3 03-16-2005 08:30 AM
Automounting?? RVK Linux - Newbie 3 03-14-2003 12:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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