-
-
Save steve-todorov/25772cd96c7480dc9211 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// /etc/polkit-1/rules.d/10-rules.rules | |
// PolKit rules to allow mounting, rebooting and network management without a password. | |
// User needs to be in storage, power and network groups. | |
polkit.addRule(function(action, subject) { | |
if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("storage")) { | |
return polkit.Result.YES; | |
} | |
}); | |
polkit.addRule(function(action, subject) { | |
if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("power")) { | |
return polkit.Result.YES; | |
} | |
}); | |
polkit.addRule(function(action, subject) { | |
if (action.id.match("org.freedesktop.upower.") && subject.isInGroup("power")) { | |
return polkit.Result.YES; | |
} | |
}); | |
polkit.addRule(function(action, subject) { | |
if (action.id.match("org.freedesktop.NetworkManager.") && subject.isInGroup("network")) { | |
return polkit.Result.YES; | |
} | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment