Skip to content

Instantly share code, notes, and snippets.

@matinrco
Created March 25, 2022 16:44
Show Gist options
  • Save matinrco/cea0c7d885c67e7e1b854062f9465476 to your computer and use it in GitHub Desktop.
Save matinrco/cea0c7d885c67e7e1b854062f9465476 to your computer and use it in GitHub Desktop.
Fedora linux internal disk mount permission fix

Allow admin users (wheel group members) to mount internal disks without password and disable polkit password prompt. Create a rule (file) in /etc/polkit-1/rules.d/50-udisks.rules with the following contents:

polkit.addRule(function(action, subject) {
  var YES = polkit.Result.YES;
  var permission = {
    "org.freedesktop.udisks2.filesystem-mount-system": YES
  };
  if (subject.isInGroup("wheel")) {
    return permission[action.id];
  }
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment