[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to disable USB automounts



On 05/09/11 16:17, Itay wrote:
> 
> When I stick a USB device into the socket it is automounted; KDE pops up
> device notification widget, file manager window, etc.
> 
> I tried to disable it:
> KDE -> System Settings -> Removable Devices, and unchecked
> "Enable automatic mounting of removable devices".
> This didn't have any effect.
> 
> In fact, I would like to disable automounts for all users.
> 
> I found in this thread two (contradicting? redundant?) advices.
> http://www.linuxquestions.org/questions/linux-newbie-8/disabling-usb-automount-kde-891757/
> 
> 
> 1) To remove the user from plugdev group.
>    (But how to avoid future new users from being added to that group?)
> 
> 2) To disable automount in udev rules.
>    I don't understand udev at all, and couldn't locate the actual
>    lines that I should comment out.
> 
> What would you recommend me to do?
> I would appreciate if some details will be provided (which lines to
> comment out, which files, etc.)
> 
> Thanks in advance,
> itay
> 
> 
> 
> 
With the greatest respects to the previous posters and there
suggestions... this has nothing to do with membership of plugdev, custom
udev rules to try and over-ride existing hal fdi, udev, and policykit
rules won't work.

Policykit knows two types of mountable drives - system and removable...
Policykit's definition of "removable" is:-
"Typically, system internal devices include non-removable internal hard
disks and other drives that are not easily added/removed by a local
console user. The heuristic typically used is that only devices on
removable media and devices connected via Firewire, USB, eSATA and SDIO
are considered external."

First remove all the customisations you've added to udev etc

Second look make sure you have no fstab entries for external drives.

Third, have a read of /etc/hal/fdi/policy/preferences.fdi

Fourth - right-click on the SOLID icon in the systray
choose "Device Notifier Settings"
in the pop-up dialog choose "Removable Devices" in the left-hand pane
Untick "Automatic mounting of removable media" and click on "OK"

If you're still stuck:-
Please paste the output of:-
ls -R /etc/hal
cat /etc/hal/fdi/policy/preferences.fdi
ls -R /etc/polkit-1

Cheers

-- 
"I ascribe to Mark Twain's theory that the last person who should be
President is the one who wants it the most. The one who should be picked
is the one who should be dragged kicking and screaming into the White
House."
— Bill Hicks


Reply to: