Forked from steve-todorov/gist:25772cd96c7480dc9211
Last active
December 2, 2015 22:53
-
-
Save carlspring/f23dde3d651d66e95a4d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 root group. | |
| polkit.addRule(function(action, subject) { | |
| if (action.id.match("org.freedesktop.udisks2.") && subject.isInGroup("root")) { | |
| return polkit.Result.YES; | |
| } | |
| }); | |
| polkit.addRule(function(action, subject) { | |
| if (action.id.match("org.freedesktop.login1.") && subject.isInGroup("root")) { | |
| return polkit.Result.YES; | |
| } | |
| }); | |
| polkit.addRule(function(action, subject) { | |
| if (action.id.match("org.freedesktop.upower.") && subject.isInGroup("root")) { | |
| return polkit.Result.YES; | |
| } | |
| }); | |
| polkit.addRule(function(action, subject) { | |
| if (action.id.match("org.freedesktop.NetworkManager.") && subject.isInGroup("root")) { | |
| return polkit.Result.YES; | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment