[How-To] Enable Auto-Mounting of External Drives In openSUSE 11
->
Due to weird-ass PolicyKit rules, you may not be able to mount external drives – such as USB Hard drives, Pen drives, or other mass storage drives. while the drive gets recognised, on trying to mount you’ll end up with this error:
org.freedesktop.hal.storage.mount-removable no <– (action, result)
This is because of a PolicyKit rule, which prevents external media from being mounted. To get around this, you’ll have to edit the policy. So first open the terminal. Switch to root by typing
su root
Next, open the PolicyKit config file corresponding to Storage. This file is located at
/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy
Open this file for editing, by typing
kate /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy
Next, search for this section
<action id="org.freedesktop.hal.storage.mount-removable">
<description>Mount file systems from external drives.</description>
<message>System policy prevents mounting external media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
And replace it with
<action id="org.freedesktop.hal.storage.mount-removable">
<description>Mount file systems from external drives.</description>
<message>System policy prevents mounting external media</message>
<defaults>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>
Save the file, and then restart the HAL subsystem by typing
rchal restart
From now on, your external drives should be mounted with full access.
If you enjoyed this post, make sure you subscribe to my RSS feed! Possibly Related posts:- Hello people,
This is Bharath Ram. I wanted to share with
- Previously I'd posted on auto-mounting partitions at startup using pysdm.
- openSUSE 11 Roadmap overview
Dec 6 openSUSE 11.0 Alpha
- As mentioned in my earlier posts, I'm a huge fan
- LiveCDs are a great way to try out (new) Linux
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.






Thx. This solution works fine for me!
@Marco Glad this post was useful to you
Does it work for RHEL?
As there is no file as /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy in RHEL, there should be some other file. There is an XML file simillar to one in SUSE at ./usr/share/hal/fdi/90defaultpolicy/storage-policy.fdi could be.
Also does it have any security threat involved?
@RD I don’t think this is needed for RHEL. The XML file you’ve mentioned is for the way the external/removable drives behave(ie, Sync transfer on/off etc).
Given that a user needs to be logged on for a removable device to be mounted, there isn’t any security threat per-se
Hi Sathya,
Your fix is the only one that has worked for me amongst many I have tried. I am using OpenSuse 11 KDE 3.5.9 release 49.1. I still find that it seems a hit & miss situation so that the USB sticks sometimes seem to time out rather than mount. Still it is better than previously when I could only mount them using console as root.
I also have PCLinux on the same computer as it is multiple boot, and using it the USB sticks mount without fail so it does not seem to be a hardware problem. Thanks for your advice. Frank
Thanks Sathya.
Hi Frank,
I’m happy that the above post could help you somehow. I don’t quite know why you’re getting the timeout, as on my system the USB drive has been connected for like > 6hours and still had no time outs. And as you mention, PCLinux works fine, so hardware problem is ruled out. I guess its some problem with openSUSE itself. If oyu do manage to find a fix, please do comment back here, it might be helpful for others.
Thanks!
I just moved from openSUSE 10.3 to 11.0 and was surprised to see that the automount feature didn’t work out “of the box.” Your fix worked great.
Thanks.
You’re a godsend!
Thanks!
You’re welcome!
To avoid editing files, I think this can be done in two lines.
Some openSUSE forum posts suggested:
# sudo polkit-auth --grant org.freedesktop.hal.storage.mount-removable --user your_user_name# sudo polkit-auth --grant org.freedesktop.hal.storage.eject --user your_user_nameThanks for the input & comment Hedge. Fixed the formatting problem, sorry for the aggravation caused!
I’ve been looking all over for this! Thanks a lot!