Comment 48 for bug 1240336

Revision history for this message
AtesComp (atescomp) wrote : Re: Not authorized to perform operation / Unable to determine the session we are in: No session for pid

OK, it is this issue. PolicyKit is choking udisk2. Here are the sample commands:

$ udisksctl mount -b /dev/sdm1 --no-user-interaction
Error mounting /dev/sdm1: GDBus.Error:org.freedesktop.UDisks2.Error.NotAuthorizedCanObtain: Not authorized to perform operation

$ udisksctl mount -b /dev/sdm1
==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount ===
Authentication is required to mount 0c76 TS512MJFLASHA (/dev/sdm1)
Multiple identities can be used for authentication:
 1. Administrator (administrator)
 2. User1 (user1)
Choose identity to authenticate as (1-2): 2
Password:
==== AUTHENTICATION COMPLETE ===
Mounted /dev/sdm1 at /media/user1/USB512MB.

Since the " --no-user-interaction" command fails, users can't mount external devices without selecting a sudo user and password authenticatation.

Once it's mounted, I can unmount normally.

The file /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla contains (partial):
[Mounting, checking, etc. of internal drives]
Identity=unix-group:admin;unix-group:sudo
Action=org.freedesktop.udisks.filesystem-*;org.freedesktop.udisks.drive-ata-smart*;org.freedesktop.udisks2.filesystem-mount-system;org.freedesktop.udisks2.encrypted-unlock-system;org.freedesktop.udisks2.filesystem-fstab;
ResultActive=yes

We need something for the little guy to mount the external devices. Maybe a rule in /usr/share/polkit-1/rules.d/ because System Settings->Removable Devices "ain't git'in 'er done."