Official NuTyX forums

Help => Tips and Tricks => Topic started by: cdrw on Tue Sep 04 18:09:18 2018

Title: rule permitting the user to be installed without privileges
Post by: cdrw on Tue Sep 04 18:09:18 2018
Hello!

Tired of installing or unmounting disks, enter the user's password.
Found on the Internet the rule allowing the mounting to the user without privileges.

Code: [Select]
cat /etc/polkit-1/rules.d/20-plugdev-group-mount-override.rules
Code: [Select]
/* http://udisks.freedesktop.org/docs/latest/udisks-polkit-actions.html */
/*20-plugdev-group-mount-override.rules*/

polkit.addRule(function(action, subject) {
  if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("wheel")) {
    return polkit.Result.YES;
  }
});

Now the connection of disks and usbkeys does not require a password.