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
This commit is contained in:
Jason Mehring 2015-02-13 15:00:54 -05:00
parent 197fa604ed
commit 567a045bcd
No known key found for this signature in database
GPG Key ID: 1BB9B1FB5A4C6DAD
3 changed files with 3 additions and 3 deletions

View File

@ -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. # 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 # See https://bugs.archlinux.org/task/31831
useradd --shell /bin/zsh --create-home user useradd --shell /bin/zsh --create-home user
usermod --groups qubes user usermod -a --groups qubes user
} }
## arg 1: the new package version ## arg 1: the new package version

View File

@ -50,7 +50,7 @@ if [ "$1" = "install" ] ; then
useradd --user-group --system -M --home /run/tinyproxy --shell /bin/false tinyproxy useradd --user-group --system -M --home /run/tinyproxy --shell /bin/false tinyproxy
} }
usermod -p '' root usermod -p '' root
usermod -L --groups qubes,sudo user usermod -L -a --groups qubes,sudo user
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
# Remove `mesg` from root/.profile? # Remove `mesg` from root/.profile?

View File

@ -116,7 +116,7 @@ groupadd --force --system --gid 98 qubes
id -u 'user' >/dev/null 2>&1 || { id -u 'user' >/dev/null 2>&1 || {
useradd --user-group --create-home --shell /bin/bash user useradd --user-group --create-home --shell /bin/bash user
} }
usermod --groups qubes user usermod -a --groups qubes user
if [ "$1" != 1 ] ; then if [ "$1" != 1 ] ; then
# do this whole %pre thing only when updating for the first time... # do this whole %pre thing only when updating for the first time...