mirror of
https://github.com/systemd/systemd.git
synced 2025-01-09 01:18:19 +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
|
glibc-locale-base
|
||||||
gnutls
|
gnutls
|
||||||
grep
|
grep
|
||||||
|
group(wheel)
|
||||||
gzip
|
gzip
|
||||||
iputils
|
iputils
|
||||||
kernel-default
|
kernel-default
|
||||||
|
@ -3,7 +3,20 @@
|
|||||||
set -e
|
set -e
|
||||||
set -o nounset
|
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
|
if command -v authselect >/dev/null; then
|
||||||
# authselect 1.5.0 renamed the minimal profile to the local profile without keeping backwards compat so
|
# 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