FollieHiyuki-dotfiles/system/etc/polkit-1/rules.d/49-nopasswd.rules

11 lines
424 B
Plaintext
Raw Normal View History

2021-04-12 12:00:49 -04:00
/* Allow running reboot, shutdown as normal user */
/* of group wheel without sudo password */
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec" &&
(action.lookup("program") == "/usr/bin/reboot" ||
action.lookup("program") == "/usr/bin/poweroff") &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});