Found the answer on the internet.
- Create a rule in /etc/polkit-1/rules.d/99-udisk2_mount.rules with the following contents:
polkit.addRule(function(action, subject)
{
polkit.log("action "+ action);
polkit.log("subject "+ subject);
if (action.id == "org.freedesktop.udisks2.filesystem-mount-system")
{
return polkit.Result.AUTH_ADMIN
};
if (action.id == "org.freedesktop.udisks2.filesystem-mount")
{
return polkit.Result.AUTH_ADMIN;
};
if (action.id == "org.freedesktop.udisks2.filesystem-mount-other-seats")
{
return polkit.Result.AUTH_ADMIN;
};
});
- Restart the Polkit policies:
systemctl restart polkit