fix(adapter): Benutzer anlegen, auch wenn die Gruppe schon existiert

Ubuntu 22.04 bringt eine Gruppe „admin“ mit; heißt der Gast-Benutzer so, brach useradd mit Code 9 ab (gefunden im Feldtest auf pve-demo). Der Container-Test legt jetzt diese Lage nach und lief seit pnpm 12 nicht mehr (pnpm -s gibt es dort nicht).

Refs #020

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 15:08:05 +02:00
co-authored by Claude Opus 5.5
parent 64859b3637
commit db57818eb3
5 changed files with 16 additions and 7 deletions
+4 -2
View File
@@ -1,6 +1,8 @@
#!/bin/bash
# Läuft im Container: systemctl-Stub, Skript ausführen, Ergebnis prüfen.
printf '#!/bin/sh\necho "[systemctl] $*" >> /tmp/systemctl.log\n' > /usr/local/bin/systemctl && chmod +x /usr/local/bin/systemctl
# Wie im Ubuntu-22.04-Cloud-Image: eine Gruppe „admin“ gibt es schon, der Benutzer heißt genauso.
getent group admin >/dev/null || groupadd admin
bash "$1" > /tmp/lauf.log 2>&1; code=$?
grep '::proxdeploy::' /tmp/lauf.log
echo "exit=$code"
@@ -10,7 +12,7 @@ docker --version; docker compose version
zabbix_agent2 -V | head -1; cat /etc/zabbix/zabbix_agent2.d/proxdeploy.conf
cat /etc/timezone; readlink /etc/localtime; grep LANG /etc/default/locale; locale -a | grep -i de_de
grep XKBLAYOUT /etc/default/keyboard
id florian; cat /etc/sudoers.d/90-proxdeploy-florian; cat ~florian/.ssh/authorized_keys
id admin; cat /etc/sudoers.d/90-proxdeploy-admin; cat ~admin/.ssh/authorized_keys
cat /etc/apt/apt.conf.d/20auto-upgrades; dpkg -l fail2ban chrony qemu-guest-agent | grep ^ii | awk '{print $2}'
cat /tmp/systemctl.log | sort -u | tr '\n' ' '; echo
echo "--- Zweiter Lauf (Idempotenz)"; bash "$1" > /tmp/lauf2.log 2>&1; echo "exit2=$?"; grep -c florian ~florian/.ssh/authorized_keys
echo "--- Zweiter Lauf (Idempotenz)"; bash "$1" > /tmp/lauf2.log 2>&1; echo "exit2=$?"; grep -c admin ~admin/.ssh/authorized_keys