From 567a045bcdb44e1069c4005bc575ebb0627b466a Mon Sep 17 00:00:00 2001 From: Jason Mehring Date: Fri, 13 Feb 2015 15:00:54 -0500 Subject: [PATCH] Make sure when user is added to qubes group that the group is appended added -a option to usermod. This will prevent other groups from being un-subscribed when qubes group is added --- archlinux/PKGBUILD.install | 2 +- debian/qubes-core-agent.preinst | 2 +- rpm_spec/core-vm.spec | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archlinux/PKGBUILD.install b/archlinux/PKGBUILD.install index 3b1e8a4..dc95332 100644 --- a/archlinux/PKGBUILD.install +++ b/archlinux/PKGBUILD.install @@ -215,7 +215,7 @@ pre_install() { # Archlinux bash version has a 'bug' when running su -c, /etc/profile is not loaded because bash consider there is no interactive pty when running 'su - user -c' or something like this. # See https://bugs.archlinux.org/task/31831 useradd --shell /bin/zsh --create-home user - usermod --groups qubes user + usermod -a --groups qubes user } ## arg 1: the new package version diff --git a/debian/qubes-core-agent.preinst b/debian/qubes-core-agent.preinst index 93e33d1..edcea6f 100755 --- a/debian/qubes-core-agent.preinst +++ b/debian/qubes-core-agent.preinst @@ -50,7 +50,7 @@ if [ "$1" = "install" ] ; then useradd --user-group --system -M --home /run/tinyproxy --shell /bin/false tinyproxy } usermod -p '' root - usermod -L --groups qubes,sudo user + usermod -L -a --groups qubes,sudo user # -------------------------------------------------------------------------- # Remove `mesg` from root/.profile? diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index c2cf750..967029c 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -116,7 +116,7 @@ groupadd --force --system --gid 98 qubes id -u 'user' >/dev/null 2>&1 || { useradd --user-group --create-home --shell /bin/bash user } -usermod --groups qubes user +usermod -a --groups qubes user if [ "$1" != 1 ] ; then # do this whole %pre thing only when updating for the first time...