Do not pass -U to useradd
The -U option doesn't have the same meaning on all distributions,
unfortunately: in some cases, it means "create a group for the user with
the same name", and in others, it means "default umask for the user".
Instead, manually create a stack group with groupadd.
Change-Id: I32f4c0603785e54a465c2d3b47a1852b8635fde0
diff --git a/stack.sh b/stack.sh
index f71283e..e013476 100755
--- a/stack.sh
+++ b/stack.sh
@@ -171,9 +171,13 @@
else
rpm -qa | grep sudo || install_package sudo
fi
+ if ! getent group stack >/dev/null; then
+ echo "Creating a group called stack"
+ groupadd stack
+ fi
if ! getent passwd stack >/dev/null; then
echo "Creating a user called stack"
- useradd -U -s /bin/bash -d $DEST -m stack
+ useradd -g stack -s /bin/bash -d $DEST -m stack
fi
echo "Giving stack user passwordless sudo priviledges"