diff options
-rw-r--r-- | mkosi.conf.d/10-opensuse/mkosi.conf | 1 | ||||
-rwxr-xr-x | mkosi.postinst.chroot | 15 |
2 files changed, 15 insertions, 1 deletions
diff --git a/mkosi.conf.d/10-opensuse/mkosi.conf b/mkosi.conf.d/10-opensuse/mkosi.conf index e741aa4a9c..dc9bf30429 100644 --- a/mkosi.conf.d/10-opensuse/mkosi.conf +++ b/mkosi.conf.d/10-opensuse/mkosi.conf @@ -43,6 +43,7 @@ Packages= glibc-locale-base gnutls grep + group(wheel) gzip iputils kernel-default diff --git a/mkosi.postinst.chroot b/mkosi.postinst.chroot index 7f2666e0a4..1809a302bc 100755 --- a/mkosi.postinst.chroot +++ b/mkosi.postinst.chroot @@ -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 |