tamir_diskmount_polkit_yetki.sh 453 B

1234567891011121314
  1. #!/bin/sh
  2. mkdir -p /etc/polkit-1/rules.d/
  3. echo '
  4. // Allow udisks2 to mount devices without authentication
  5. // for users in the "wheel" group.
  6. polkit.addRule(function(action, subject) {
  7. if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
  8. action.id == "org.freedesktop.udisks2.filesystem-mount") &&
  9. subject.isInGroup("wheel")) {
  10. return polkit.Result.YES;
  11. }
  12. });
  13. ' > /etc/polkit-1/rules.d/10-udisks2.rules