From 29b57830522443593fadca432954a50b87b45641 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 16 Jun 2026 18:15:05 +0000 Subject: [PATCH] Fix LightDM autologin on fresh server installs (nopasswdlogin group + missing config) Two bugs caused the login screen to appear on new Ubuntu 24.04 server hardware: 1. Ubuntu 24.04's PAM config checks 'user ingroup nopasswdlogin', not 'autologin'. Add kiosk user to nopasswdlogin group (and autologin for older versions). 2. The upgrade path never wrote /etc/lightdm/lightdm.conf.d/10-kiosk.conf, so on new hardware running through upgrade the file simply didn't exist. Refactor: extract configure_lightdm_autologin() shared helper called from both fresh install (step 19/27) and upgrade, so both paths are consistent. Also use [Seat:*] instead of [SeatDefaults] for forward compatibility. https://claude.ai/code/session_01VQ13Fwq4MXxwThLfCXBeGr --- ubuntu-based-kiosk-v1.0.3.sh | 44 ++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/ubuntu-based-kiosk-v1.0.3.sh b/ubuntu-based-kiosk-v1.0.3.sh index 3c65b77..9b0c489 100644 --- a/ubuntu-based-kiosk-v1.0.3.sh +++ b/ubuntu-based-kiosk-v1.0.3.sh @@ -7557,23 +7557,7 @@ EndSection EOF echo "[19/27] Configuring autologin..." - sudo mkdir -p /etc/lightdm/lightdm.conf.d - # [Seat:*] is required on Ubuntu 22.04+ ([SeatDefaults] is ignored on newer LightDM) - # Also add kiosk user to the autologin group required by newer Ubuntu - sudo groupadd -f autologin - sudo usermod -aG autologin "$KIOSK_USER" - sudo tee /etc/lightdm/lightdm.conf.d/10-kiosk.conf > /dev/null < /dev/null <