From 2adbe07ee9e754716ccd5c5b9833f9a46c70a13f Mon Sep 17 00:00:00 2001 From: Christopher Laprise Date: Thu, 18 Jul 2019 05:23:21 -0400 Subject: [PATCH] allow repeat configure --- configure-sudo-prompt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configure-sudo-prompt b/configure-sudo-prompt index 8a48904..fd28f8b 100644 --- a/configure-sudo-prompt +++ b/configure-sudo-prompt @@ -7,13 +7,13 @@ set -e if [ ! -e /etc/sudoers.d/qubes ]; then echo "The 'qubes-core-agent-passwordless-root' package does not appear" - echo "to be present. Sudo autoconfiguration is unnecessary." + echo "to be present or configured; sudo autoconfiguration skipped." exit 0 fi if [ ! -e /etc/debian_version ]; then echo "Debian-based template required for sudo autoconfiguration. -See qubes-os.org/doc/vm-sudo for manual instructions." +See https://qubes-os.org/doc/vm-sudo for manual instructions." exit 1 fi @@ -23,7 +23,7 @@ should me made of this template!" read -p "Configure sudo authentication prompt now? (y/n): " answer if [[ $answer == @(y|Y) ]]; then - mv --backup=numbered -fb /etc/pam.d/common-auth /etc/pam.d/common-auth.bak + mv -fb /etc/pam.d/common-auth /etc/pam.d/common-auth~ cat >/etc/pam.d/common-auth <<_EOF auth [success=1 default=ignore] pam_exec.so seteuid /usr/lib/qubes/qrexec-client-vm dom0 qubes.VMAuth /bin/grep -q ^1$ auth requisite pam_deny.so @@ -38,9 +38,9 @@ _EOF sed -ri 's/^(auth[[:space:]]sufficient[[:space:]]pam_permit.so)/#\1/' /etc/pam.d/su mv -f /etc/polkit-1/rules.d/00-qubes-allow-all.rules \ - /etc/polkit-1/rulesd_00-qubes-allow-all.rules.bak + /etc/polkit-1/rulesd_00-qubes-allow-all.rules.bak || true mv -f /etc/polkit-1/localauthority/50-local.d/qubes-allow-all.pkla \ - /etc/polkit-1/localauthority_50-locald_qubes-allow-all.pkla.bak + /etc/polkit-1/localauthority_50-locald_qubes-allow-all.pkla.bak || true echo "Done."