Description of problem: policykit requires an admin password to mount a USB device, but only on logins after the first one even if the user logs out properly from the first session. I believe some aspect of the session isn't being cleaned up. This problem occurs even if it's the same user. It occurs when using, kdm, gdm, GNOME and Xfce. The policykit action is org.freedesktop.udisks2.filesystem-mount. Version-Release number of selected component (if applicable): systemd-216-25.fc21.x86_64 How reproducible: 100% Steps to Reproduce: 1. Log in as non-root user. 2. Insert usb device. 3. USB device can be mounted (either via a filemanager or gnome on-screen prompt.) 4. umount USB device (using filemanager) and remove device 5. logout 6. log in as same (or different) non-root user 7. insert USB device (nothing happens) 8. try to mount device by clicking on icon in file manager 9. get prompted for admin password Actual results: Unable to mount USB device after initial login. Expected results: Users should be able to mount USB devices if the prior user logged out. It worked this way in Fedora 20. Additional info: It appears to my that the policykit/udisks2 policy has not changed from Fedora 20. I can make the subsequent logins be able to mount USB by using loginctl kill-session X on the old session. I examined loginctl info for sessions on Fedora 20 and Fedora 21 and I don't see any difference. The current (2nd) session is always shown as Active.
This appears to be fixed in the version of systemd shipped with Fedora 22. My description doesn't quite match what was happening either. Basically if you log in, log out, and log in again you cannot use any of the policykit actions that require you to be considered "active" even though all the loginctl output indicates you are in fact "active". If another user logs in you can log in and it will work. It's only two logins from the same user in a row that breaks all the policykit actions (requires admin.)
Is it possible to take the fix to Fedora 21? Either backporting the fix, or upgrading to an newer systemd version? Or is there a workaround (for a single non-root user), other than rebooting the machine or searching for another use who will temporary log in at the console? Its a problem for our users because most of use the same machine all day and some log out in the evening and log in again at the next morning. Thanks in advance!
This is what I used to upgrade to release 22 systemd: yum update --releasever=22 systemd My other workaround which only worked for USB mounting was to patch /usr/share/polkit-1/actions/org.freedesktop.udisks2.policy I'll attach the patch I used... you won't need it if you update systemd which probably fixes many other issues users might encounter.
Created attachment 1069115 [details] workaround for USB mounting Works around USB issue caused by systemd bug. Probably requires a polkitd restart.