Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Restoring the ability to mount local drives as a normal user, without password, in Debian 11
Posted 09-09-2021 at 01:20 PM by the dsc
Tags debian, mount, password, policy kit, polkit
I don't recall having tweaked any setting to have "udiskctl mount" working without password in the same exact situation, but whatever happened, after the upgrade from Debian 10 to 11, it no longer worked.
While there are quite a few examples of how to set up the correct "polkit" rule for it around, most of them refer to a newer version of polkit that uses a different syntax. Debian's pkaction version is still 1.105. And apparently the file needs to be in the correct directory, even that differs between versions, surprisingly. I'd think the directory structure was somewhat of an arbitrary user preference, only following some numbering rules, bu,t in the end, everything somewhere there would be set, unless perhaps there were conflicting rules.
I found in askubuntu this answer that worked for me. The code itself is
And the file got to have a .pkla extension, and be at /etc/polkit-1/localauthority/50-local.d/10-mount-without-password.pkla -- altough the filename itself is arbitrary.
While there are quite a few examples of how to set up the correct "polkit" rule for it around, most of them refer to a newer version of polkit that uses a different syntax. Debian's pkaction version is still 1.105. And apparently the file needs to be in the correct directory, even that differs between versions, surprisingly. I'd think the directory structure was somewhat of an arbitrary user preference, only following some numbering rules, bu,t in the end, everything somewhere there would be set, unless perhaps there were conflicting rules.
I found in askubuntu this answer that worked for me. The code itself is
Code:
[storage group mount override] Identity=unix-user:USERNAME Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system ResultAny=yes ResultInactive=yes ResultActive=yes
Total Comments 1
Comments
-
Call me oblivious, but can't you just set this up in fstab by adding the "user" option?
Erm, like this bit I use so that a user can mount a usb stick:
Code:/dev/sdb1 /mnt/sdb1 auto noauto,user 0 0 /dev/sdb5 /mnt/sdb5 auto noauto,user 0 0
Posted 09-25-2021 at 09:17 PM by jr_bob_dobbs