summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rebischke <Chris.Rebischke@posteo.de>2017-07-02 21:29:29 +0200
committerGitHub <noreply@github.com>2017-07-02 21:29:29 +0200
commite4e213109abbc128c576383310da3d6b11c5a68b (patch)
treebc6fb69959b352981ebe0171ea0125d141f5281b
parent46f1cb4c1fd33b3835b56c285279d1e38a011fab (diff)
parent69fa632083a1ef1087e1d7ec5fa8f6c7c7a4a576 (diff)
downloadarch-boxes32-e4e213109abbc128c576383310da3d6b11c5a68b.tar.xz
Merge pull request #7 from rafaelsoaresbr/configure-polkit
Setting up authorization rule for Polkit
-rw-r--r--http/install-chroot.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/http/install-chroot.sh b/http/install-chroot.sh
index 28e4921..8cfb7d5 100644
--- a/http/install-chroot.sh
+++ b/http/install-chroot.sh
@@ -12,6 +12,15 @@ echo -e 'vagrant\nvagrant' | passwd
useradd -m -U vagrant
echo -e 'vagrant\nvagrant' | passwd vagrant
+# setting automatic authentication for any action requiring admin rights via Polkit
+cat <<EOF > /etc/polkit-1/rules.d/49-nopasswd_global.rules
+polkit.addRule(function(action, subject) {
+ if (subject.isInGroup("vagrant")) {
+ return polkit.Result.YES;
+ }
+});
+EOF
+
# setting sudo for vagrant user
cat <<EOF > /etc/sudoers.d/vagrant
Defaults:vagrant !requiretty