Problem
gnome-initial-setup fails at the final user-creation step with:
accounts-daemon: useradd: cannot create directory /var/home/james
gnome-initial-setup: Error saving data: Failed to create user 'james':
GDBus.Error:org.freedesktop.Accounts.Error.Failed: running '/usr/sbin/useradd' failed: Child process exited with code 12
GIS then times out, the done marker (/var/lib/gnome-initial-setup-done) is never written, and GIS re-runs on every subsequent boot — creating an infinite loop.
Root Cause
shadow-utils 4.15.0 (EL10) calls mkdir(/var/home/<user>) in create_home_dir(). If the directory already exists (e.g. from a previous install on the same disk), mkdir returns EEXIST and shadow-utils exits with code 12 (E_HOMEDIR) rather than skipping creation gracefully.
This is reproducible when:
- Installing Yellowfin onto a disk that previously had a Yellowfin (or any Linux) install with
/var/home/<username> already present
- The
/var partition/directory is not wiped by the installer
Environment
- Image:
ghcr.io/tuna-os/yellowfin:gnome50
gnome-initial-setup-50.0-2.el10
shadow-utils-4.15.0-11.el10
selinux-policy-43.1-1.el10 (enforcing)
gnome50-el10-compat-1.2.6-1.el10 installed — SELinux modules present, no AVC denials observed
Workaround
touch /var/lib/gnome-initial-setup-done
This prevents GIS from re-running. The user then needs to be created manually via useradd.
Proposed Fixes
Option A — accounts-service / GIS wrapper (preferred)
Before calling useradd -m, check if the home directory already exists. If it does, pass -M (no home creation) and then chown/restorecon the existing directory instead.
This could be a patch to our gnome-initial-setup spec or a wrapper script around useradd.
Option B — shadow-utils patch
Backport the upstream shadow-utils fix that handles EEXIST gracefully in create_home_dir(). Newer versions (4.17+) handle this case.
Option C — tuna-installer
Have the tuna-installer wipe /var/home during a fresh install so GIS always has a clean slate.
Notes
gnome-initial-setup-first-login.service was skipped (ConditionEnvironment=XDG_SESSION_CLASS=user unmet) — so the copy-worker never ran either
- F43 ships GIS 49.0; our COPR has GIS 50.0 (correct for gnome50 variant, matches F44)
- The
brew-setup.service bakes /var/home/linuxbrew into the image — this is unrelated but confirms /var/home is pre-populated before first boot
Problem
gnome-initial-setupfails at the final user-creation step with:GIS then times out, the done marker (
/var/lib/gnome-initial-setup-done) is never written, and GIS re-runs on every subsequent boot — creating an infinite loop.Root Cause
shadow-utils 4.15.0 (EL10) calls
mkdir(/var/home/<user>)increate_home_dir(). If the directory already exists (e.g. from a previous install on the same disk),mkdirreturnsEEXISTand shadow-utils exits with code 12 (E_HOMEDIR) rather than skipping creation gracefully.This is reproducible when:
/var/home/<username>already present/varpartition/directory is not wiped by the installerEnvironment
ghcr.io/tuna-os/yellowfin:gnome50gnome-initial-setup-50.0-2.el10shadow-utils-4.15.0-11.el10selinux-policy-43.1-1.el10(enforcing)gnome50-el10-compat-1.2.6-1.el10installed — SELinux modules present, no AVC denials observedWorkaround
This prevents GIS from re-running. The user then needs to be created manually via
useradd.Proposed Fixes
Option A — accounts-service / GIS wrapper (preferred)
Before calling
useradd -m, check if the home directory already exists. If it does, pass-M(no home creation) and thenchown/restoreconthe existing directory instead.This could be a patch to our
gnome-initial-setupspec or a wrapper script arounduseradd.Option B — shadow-utils patch
Backport the upstream shadow-utils fix that handles
EEXISTgracefully increate_home_dir(). Newer versions (4.17+) handle this case.Option C — tuna-installer
Have the tuna-installer wipe
/var/homeduring a fresh install so GIS always has a clean slate.Notes
gnome-initial-setup-first-login.servicewas skipped (ConditionEnvironment=XDG_SESSION_CLASS=userunmet) — so the copy-worker never ran eitherbrew-setup.servicebakes/var/home/linuxbrewinto the image — this is unrelated but confirms/var/homeis pre-populated before first boot