disable password in polkit

This commit is contained in:
Mylloon 2025-04-23 14:15:50 +02:00
parent de665b5171
commit 805939bc44
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 13 additions and 0 deletions

8
49-nopasswd_global.rules Normal file
View file

@ -0,0 +1,8 @@
/* Allow members of the wheel group to execute any actions
* without password authentication, similar to "sudo NOPASSWD:"
*/
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});

View file

@ -25,6 +25,11 @@ function main {
sudo pacman -Rsn --noconfirm "$(pacman -Qqtd)"
# === Admin privileges ==
sudo usermod -a -G wheel anri
curl -s ${repo}/polkitrules/49-nopasswd_global.rules > /etc/polkit-1/rules.d/49-nopasswd_global.rules
# === Global OS configuration set-up ==
curl ${repo}/meta.sh -s | bash -s -- ${repo}