From 8047ec780a44c6b538b412e0173152045ab82191 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Wed, 6 Apr 2011 23:04:42 +0200 Subject: [PATCH] Remove passwords prompts for user and root (#202) --- appvm/qubes.sudoers | 1 + rpm_spec/core-appvm.spec | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 appvm/qubes.sudoers diff --git a/appvm/qubes.sudoers b/appvm/qubes.sudoers new file mode 100644 index 00000000..58411299 --- /dev/null +++ b/appvm/qubes.sudoers @@ -0,0 +1 @@ +user ALL=(ALL) NOPASSWD: ALL diff --git a/rpm_spec/core-appvm.spec b/rpm_spec/core-appvm.spec index 8b0d3aa3..9b97616c 100644 --- a/rpm_spec/core-appvm.spec +++ b/rpm_spec/core-appvm.spec @@ -48,12 +48,17 @@ The Qubes core files for installation inside a Qubes AppVM. %pre +# Remove password for root, so PolicyKit will not ask for it +usermod -p '' root + if [ "$1" != 1 ] ; then +# remove user password if this is upgrade +usermod -p '' user # do this whole %pre thing only when updating for the first time... exit 0 fi -adduser --create-home user +adduser -p '' --create-home user su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts' su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm2.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"' su user -c 'ln -s /usr/bin/qvm-open-in-dvm2 /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"' @@ -99,6 +104,9 @@ install -D ../u2mfn/u2mfn-kernel.h $RPM_BUILD_ROOT/usr/include/u2mfn-kernel.h install -D ../vchan/libvchan.so $RPM_BUILD_ROOT/%{_libdir}/libvchan.so install -D ../u2mfn/libu2mfn.so $RPM_BUILD_ROOT/%{_libdir}/libu2mfn.so +install -d $RPM_BUILD_ROOT/etc/sudoers.d +install -m 0440 qubes.sudoers $RPM_BUILD_ROOT/etc/sudoers.d/qubes + mkdir -p $RPM_BUILD_ROOT/var/run/qubes %triggerin -- initscripts @@ -147,7 +155,7 @@ rm -rf $RPM_BUILD_ROOT %attr(700,user,user) /home_volatile/user /etc/X11/xorg-preload-apps.conf %dir /var/run/qubes - +/etc/sudoers.d/qubes %package devel Summary: Include files for qubes core libraries