PolicyKit: only one user can mount USB sticks

Looks like its some sort of PolicyKit issue. Documentation (and I suspect the system itself) all assume that I have only one user. But my computer is a two-seat, my girlfriend and I are logged in at the same time.

Only I am able to mount and write to USB drives. I suspect its because my account is always logged in first.

Dolphin gives the following error:
org.freedesktop.Hal.Device.PermissionDeniedByPolicy
blah blah
org.freedesktop.hal.storage.mount-removable auth_admin_keep_always

So my guess is that this “auth_admin” for some reason only refers to my user.

I opened up the “Global Configuration” application (something that typed up when I filtered for ‘policy’ in the application launcher), and added my user, my girlfriends user and the ‘user’ group as “System Administrators”. I logged out and logged back in on her account and this did nothing.

How do I fix it?

Sorry, I can’t give an authoritative answer, but I encountered similar problems and solved them by trial and error. You can set permissions for users in the config file /etc/PolicyKit.conf

<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">

        <match user="vodoo">
                <return result="yes"/>
        </match>

</config>

result=“yes” means “just let him do it”. You can add more “match” groups for other users. Have a look at man PolicyKit.conf.

I added two lines to file /etc/polkit-default-privs.local as well:

#
# /etc/polkit-default-privs.local
#
# This file is used by set_polkit_default_privs to check or set
# the implicit default privileges granted by PolicyKit
#
# In particular, this file will not be touched during an upgrade of the
# installation. It is designed to be a placeholder for local
# additions by the administrator of the system.
#
# Note that you need to run /sbin/set_polkit_default_privs for
# changes to take effect.
#
# Format:
# <privilege> <any>:<inactive>:<active>
#
org.freedesktop.udisks.filesystem-mount                 no:no:yes
org.freedesktop.hal.storage.mount-removable             no:no:yes

If you can read (and understand) a bit of German, have a look at this most interesting thread explaining how to define udev rules:

automatisch mount externe USB - Festplatte

I hope this gets you started. Tweak it for your needs, and -please- report back here what worked for you.