summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorRafael Soares <rafaelsoaresbr@gmail.com>2017-07-02 13:50:46 -0400
committerRafael Soares <rafaelsoaresbr@gmail.com>2017-07-02 13:50:46 -0400
commit69fa632083a1ef1087e1d7ec5fa8f6c7c7a4a576 (patch)
treebc6fb69959b352981ebe0171ea0125d141f5281b /http
parent46f1cb4c1fd33b3835b56c285279d1e38a011fab (diff)
downloadarch-boxes32-69fa632083a1ef1087e1d7ec5fa8f6c7c7a4a576.tar.xz
Setting up authorization rule for Polkit
Diffstat (limited to 'http')
-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