From 69fa632083a1ef1087e1d7ec5fa8f6c7c7a4a576 Mon Sep 17 00:00:00 2001 From: Rafael Soares Date: Sun, 2 Jul 2017 13:50:46 -0400 Subject: Setting up authorization rule for Polkit --- http/install-chroot.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'http') 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 < /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 < /etc/sudoers.d/vagrant Defaults:vagrant !requiretty -- cgit v1.2.3-70-g09d2