From b0c0008d44d3de8c9b2fbed603bac31558bd583f Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 9 Oct 2026 16:55:03 +0000 Subject: [PATCH] Create missing groups before adding the kiosk user (no netdev on 26.04) Reported on a 26.04 offline install, first-boot step 2: useradd: group 'netdev' does not exist useradd refuses to create the user at all when any -G group is missing, which stopped provisioning. Ubuntu 26.04 Server's base system has audio, video, input and plugdev but no netdev (checked against the 26.04.1 ISO's /etc/group). provision_create_kiosk_user now `groupadd -f -r`s each supplementary group first (a no-op when it exists), then passes the same list to useradd. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01Cjz8a58eB5P9sUweqd3NHm --- lib/provision.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lib/provision.sh b/lib/provision.sh index 82aeb37..9df888c 100644 --- a/lib/provision.sh +++ b/lib/provision.sh @@ -94,8 +94,17 @@ provision_install_packages() { provision_create_kiosk_user() { echo "[2/10] Creating kiosk user..." + local kiosk_groups=(audio video input plugdev netdev) + # Not every Ubuntu release ships all of these - 26.04 Server has no + # netdev group - and useradd refuses to create the user at all if any + # -G group is missing. Create missing ones as plain system groups + # (no-op when they exist). + local g + for g in "${kiosk_groups[@]}"; do + sudo groupadd -f -r "$g" + done if ! id "$KIOSK_USER" &>/dev/null; then - sudo useradd -m -s /bin/bash -G audio,video,input,plugdev,netdev "$KIOSK_USER" + sudo useradd -m -s /bin/bash -G "$(IFS=,; echo "${kiosk_groups[*]}")" "$KIOSK_USER" echo "$KIOSK_USER:kiosk" | sudo chpasswd log_success "Kiosk user created (default password: kiosk - change it)" else