mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
mkosi: Beef up testuser a bit
Give it a password and add it to some common groups.
This commit is contained in:
parent
b3db96f230
commit
3fe25d4530
@ -43,6 +43,7 @@ Packages=
|
||||
glibc-locale-base
|
||||
gnutls
|
||||
grep
|
||||
group(wheel)
|
||||
gzip
|
||||
iputils
|
||||
kernel-default
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user