When seeing this message, I was wondering how this can come back again, as I have fixed it a long while ago by editing the /usr/share/polkit-1/actions/org.freedesktop.devicekit.disks.policy file (in Karmic Koala) allowing any user — not just the active ones — to mount usb harddrives. But, this file was gone… :(
…if not interested in the intermezzos, just the fix, scroll to the end… :)
However, discovered a new “suspicious” file in the same directory: /usr/share/polkit-1/actions/org.freedesktop.udisks.policy. I opened it with great hopes, and was not disappointed, right at the beginning was this section:
<action id="org.freedesktop.udisks.filesystem-mount"> <description>Mount a device</description> <description xml:lang="da">Montér en enhed</description> <description xml:lang="de">Gerät einhängen</description> <message>Authentication is required to mount the device</message> <message xml:lang="da">Autorisering er påkrævet for at montere et fil system</message> <message xml:lang="de">Zugriffsrechte werden benötigt um das Gerät einzuhängen</message> <defaults> <allow_any>no</allow_any> <allow_inactive>no</allow_inactive> <allow_active>yes</allow_active> < /defaults> < /action>
thought that I simply switch the following values, and that will be it:
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
well, doing it (and restarting policykit) was a disappointment, I still had these “Not Authorized” messages when plugging my external HDD in (or trying to mount it with Nautilus in my VNC session)…
Anyway, after some time googling I found nothing but some people complaining about the same thing… I tried reinstalling policykit, policykit-gnome, policykit-desktop-privileges, policykit-1, etc. no use.
Finally, this pointed me in the right direction:
locate policykit
…
/var/lib/dpkg/info/policykit-1.list
/var/lib/dpkg/info/policykit-1.md5sums
/var/lib/dpkg/info/policykit-1.postinst
/var/lib/dpkg/info/policykit-desktop-privileges.list
/var/lib/dpkg/info/policykit-desktop-privileges.md5sums
/var/lib/dpkg/info/policykit-gnome.list
/var/lib/dpkg/info/policykit-gnome.md5sums
…
let’s see what the desktop privileges package installs:
cat /var/lib/dpkg/info/policykit-desktop-privileges.list
/.
/var
/var/lib
/var/lib/polkit-1
/var/lib/polkit-1/localauthority
/var/lib/polkit-1/localauthority/10-vendor.d
/var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
/usr
/usr/share
/usr/share/doc
/usr/share/doc/policykit-desktop-privileges
/usr/share/doc/policykit-desktop-privileges/copyright
/usr/share/doc/policykit-desktop-privileges/changelog.gz
ok, eager to see that policy file:
cat /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla
[Mounting, checking, etc. of internal drives]
Identity=unix-group:admin
Action=org.freedesktop.udisks.filesystem-;org.freedesktop.udisks.drive-ata-smart
ResultActive=yes[Change CPU Frequency scaling]
Identity=unix-group:admin
Action=org.gnome.cpufreqselector
ResultActive=yes[Setting the clock]
Identity=unix-group:admin
Action=org.gnome.clockapplet.mechanism.*
ResultActive=yes
SOLUTION
ok, the structure and values in the file, especially “ResultActive” looked promising (I must admit, at this point I was too impatient and sleepy, so did not do further readings on the subject), so I just added the following 2 lines after every section in the file:
nano -w /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla (sudo if you’re using your regular user account)
ResultAny=auth_admin
ResultInactive=yes
restarted policykit, and suddenly I could mount from Nautilus again… :)