LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Blogs > linux-related notes
User Name
Password

Notices


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.
Rate this Entry

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

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

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
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.
Posted in Uncategorized
Views 797 Comments 1
« Prev     Main     Next »
Total Comments 1

Comments

  1. Old Comment
    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 jr_bob_dobbs is offline
 

  



All times are GMT -5. The time now is 10:09 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration