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

Re: How to disable USB automounts

On Mon, 5 Sep 2011, Brian wrote:


In fact, I would like to disable automounts for all users.

In which case it would have to be done at the system level. Even if the
KDE System Settings method worked for you it is (if it's anything like
XFCE) configurable by a user - not what you want.


I found in this thread two (contradicting? redundant?) advices.

1) To remove the user from plugdev group.
   (But how to avoid future new users from being added to that group?)

The user would no longer be able to mount, view or use files on the USB
device. Which is ok if that is your intention. Removing a new user from
the plugdev group is a snap with vigr and not tedious if it is only
done every so often (and you remember!).

Sounds like the udev option is better in this case.

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.

Create the file


and in it put the line

  ACTION="add|change", subsystem=="block", ENV{UDISKS_AUTOMOUNT_HINT}="never"

No need to reboot as it takes effect immediately.

Before doing this you will have read udisks(7) and know why it may not
work. You may also want to investigate changing the udev rule to see the

Thanks for the information.
I will try to follow the prescription and reading advice.


Reply to: