Skip to content

Commit 375d510

Browse files
committed
fix: unset SUDO_USER before armbian-config chroot call
Host's SUDO_USER=igorp leaks into the chroot via chroot_sdcard. module_desktop_getuser tries `id $SUDO_USER` which fails with 'id: igorp: no such user' because the host user doesn't exist in the chroot's /etc/passwd. Clear it so getuser falls through to the awk path (and mode=build skips the call entirely once configng PR #859 is published to apt.armbian.com).
1 parent 2d41b70 commit 375d510

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/functions/rootfs/distro-agnostic.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,13 @@ function install_distribution_agnostic() {
424424
# start/autologin) — no real user exists at image-build time;
425425
# armbian-firstrun creates the first user on first boot.
426426
# See armbian/configng#859.
427-
chroot_sdcard "DEBIAN_FRONTEND=noninteractive armbian-config --api module_desktops install de=${DESKTOP_ENVIRONMENT} tier=${DESKTOP_TIER:-mid} mode=build"
427+
# SUDO_USER= unset: host's SUDO_USER leaks into the chroot
428+
# via chroot_sdcard. module_desktop_getuser tries `id $SUDO_USER`
429+
# which fails noisily because the host user doesn't exist in the
430+
# chroot's /etc/passwd. Clearing it lets getuser fall through to
431+
# the awk path (which finds nothing in build mode → mode=build
432+
# skips it entirely).
433+
chroot_sdcard "SUDO_USER= DEBIAN_FRONTEND=noninteractive armbian-config --api module_desktops install de=${DESKTOP_ENVIRONMENT} tier=${DESKTOP_TIER:-mid} mode=build"
428434

429435
# Disable display managers for first boot — armbian-firstrun
430436
# enables the appropriate one after initial setup completes.

0 commit comments

Comments
 (0)