USB and other external drives mount for wrong user

Hi everyone. I have MATE 20.04 LTS installed on a laptop with 4 users. Plugging in SD cards and USB sticks works perfectly, unless there is someone else logged in on the machine.
eg:
1- user A logs in, then walks away and screen locks
2- user B switches to the login screen and logs in as user B
3- user B plugs in a USB stick, but it doesn't mount for user B
4- (hidden from sight) user A gets an "authentication is required to mount... /dev/sdb1" error and the window is asking for admin password
- details of this are:
polkit.subject-pid: 102318
polkit.caller-pid: 806
Action: org.freedesktop.udisks2.filesystem-mount-other-seat
Vendor: The Udisks Project

user B has no indication on why it didn't mount. If they click on the USB stick in the Caja side bar, they get an "Unable to mount USB Disk - an operation is already pending"

So it seems that automount is trying to show the USB stick to the inactive user A, totally blocking user B. (user B doesn't even get the chance to enter an admin password to override)

the only solution is basically to "switch account", log in as user A and log them out.
(this clearly doesn't work if user B doesn't know their password!)

This doesn't appear limited to MATE, I saw it before regularly with Linux Mint (cinnamon). How can we force the USB stick to be mounted by the active desktop user??

This can also be a security issue,

I think you can open a bug to the ubuntu mate team :

If this is originality of ubuntu mainstream, it will probably get relayed there.

1 Like

FYI, I filed one of these about 2 years ago, and at there's at least one other dupe of it already. I'll dig up the IDs tomorrow or so.

1 Like