2

I've tried adding the following to my /etc/polkit-1/localauthority/50-local.d/

[storage group mount override]  
Identity=unix-user:ada  
Action=org.freedesktop.udisks2.filesystem-mount;org.freedesktop.udisks2.filesystem-mount-system  
ResultsAny=yes  
ResultsInactive=yes  
ResultsActive=yes  

As far as I can remember, it worked in Ubuntu 17.10. Now, I'm using Ubuntu 18.04(mini.iso) + i3wm without any Display Manager.
Update 1: Tried adding the following lines to /etc/polkit-1/rules.d/10-udisks2.rules

polkit.addRule(function(action, subject) {  
if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||  
action.id == "org.freedesktop.udisks2.filesystem-mount") &&  
subject.isInGroup("sudo")) {  
return polkit.Result.YES;  
}  
});  

still getting the password prompt when mounting drives in Thunar.

2 Answers2

3

You could edit the file org.freedesktop.udisks2.policy in /usr/share/polkit-1/actions. Search for the textblock containing the line: <action id="org.freedesktop.udisks2.filesystem-mount-system"> At the bottom of this block you will find the line: <allow_active>auth_admin_keep</allow_active> Change auth_admin_keep to yes and you will be able to mout partitions without being asked for a password. However any user wil be able to perform this action.

The .rules files will not work since the polkit version installed in 18.04 is 0.105, .rules files can only be used in version 0.106 and higher. I don't know why your solution isn't working, it seems to be conforming to polkit rules. See the following answer as well: PolicyKit rules never come into effect .

jeroen
  • 1,930
0

You may find an answer here.

Seems you need to create file /etc/polkit-1/rules.d/10-udisks2.rules

graham
  • 10,436