1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-26 17:27:41 +03:00

mkosi: Beef up testuser a bit

Give it a password and add it to some common groups.
This commit is contained in:
Daan De Meyer 2024-07-31 17:42:56 +02:00
parent b3db96f230
commit 3fe25d4530
2 changed files with 15 additions and 1 deletions

View File

@ -43,6 +43,7 @@ Packages=
glibc-locale-base
gnutls
grep
group(wheel)
gzip
iputils
kernel-default

View File

@ -3,7 +3,20 @@
set -e
set -o nounset
useradd --uid 4711 --create-home --user-group testuser
if [[ "$DISTRIBUTION" =~ ubuntu|debian ]]; then
SUDO_GROUP=sudo
else
SUDO_GROUP=wheel
fi
useradd \
--uid 4711 \
--user-group \
--create-home \
--password "$(openssl passwd -1 testuser)" \
--groups "$SUDO_GROUP",systemd-journal \
--shell /bin/bash \
testuser
if command -v authselect >/dev/null; then
# authselect 1.5.0 renamed the minimal profile to the local profile without keeping backwards compat so