Repository navigation
Description
Summary
The Kali template (910 tpl-kali-saruman, and almost certainly the shared 902/903 built from the same packer/kali.pkr.hcl + packer/kali/preseed.cfg.pkrtpl) ships ~14 service accounts with their shadow account-expiry pinned to the epoch (1970-01-02). Every clone therefore boots degraded, because lightdm's systemd user manager fails PAM.
Found on garuda (162) during the #921 §9 desktop pass. Fixed live on garuda (see below); the template still produces it.
Symptom
$ systemctl is-system-running
degraded
$ systemctl --failed
user@968.service loaded failed failed User Manager for UID 968
user@968.service log:
pam_unix(systemd-user:account): account lightdm has expired (account expired)
user@968.service: Failed to set up PAM session: Operation not permitted
user@968.service: Failed at step PAM ... status=224/PAM
UID 968 is lightdm. Its password being locked (L) is correct for a daemon; the problem is shadow field 8 (account expiry) = 1.
Scope — it's blanket, not lightdm-only
Every system account (UID < 1000) created at build time has expiry = epoch:
systemd-network _dhcpcd systemd-timesync tcpdump Debian-snmp mysql
inetsim _gvm pcscd rtkit dnsmasq lightdm nm-openvpn nm-openconnect
root, the operator analyst, and a couple of daemons (sshd, messagebus) are clean. lightdm is the only one that surfaces because it's the only expired account systemd starts a user@<uid>.service for (it lingers a session for the greeter); the rest are pure daemons that never hit PAM's account path, so their expired state is invisible — but it's a latent trap for any of them that later needs a user session.
The greeter itself works (lightdm active, session live), so the desktop is usable — only the systemd state is dirty.
Origin
Not from our build: grep -rniE "chage|usermod +-e|passwd +-e|--expire|expiredate|EXPIRE" packer/ scripts/ tofu/ stacks/ finds nothing that touches account expiry. Last-password-change on these accounts is the build day with expiry at epoch, so it's coming from the Kali installer / package-postinst layer during the preseed install, not from preseed.cfg.pkrtpl.
Fix applied to garuda (live, so #921 isn't left degraded)
# for every UID<1000 account whose shadow expiry field == 1:
chage -E -1 <account>
systemctl start user@968.serviceResult: account expires: never, user@968 active, 0 failed units, systemctl is-system-running → running.
Suggested template fix
Clear the spurious expiry in the Kali build so fresh clones aren't born degraded. Minimal, in the preseed late_command (or a first-boot unit):
# Kali package postinsts leave service accounts expired at the epoch; undo it.
awk -F: '$3 < 1000 {print $1}' /etc/passwd | while read -r u; do
[ "$(getent shadow "$u" | cut -d: -f8)" = "1" ] && chage -E -1 "$u"
done(Or narrowly: chage -E -1 lightdm, since lightdm is the only one that currently fails — but clearing all of them removes the latent traps.)
To verify
- Rebuild 910 and confirm a fresh first boot is
running, notdegraded. - Check 902 and 903 (shared file/preseed) for the same condition and fold the fix in once, since the template is shared.
Environment
- Template 910
tpl-kali-saruman, guest garuda 162, Kali Purple,packer/kali.pkr.hcl+packer/kali/preseed.cfg.pkrtpl. - Related: ADR-0091, A Kali Purple analyst workstation (garuda) on Saruman, not a second SOC #921 §9.
Activity
Gerrrt commentedon Oct 14, 2026
Sibling verification (2026-10-14)
Correcting the "verify 902/903" note above: 903 is
tpl-debian-13(a different, Debian preseed), not a Kali sibling. The shared Kali file (packer/kali.pkr.hcl+packer/kali/preseed.cfg.pkrtpl) backs 910 (Saruman) and 902 (ifrit).903 (
tpl-debian-13) — same quirk, but latent/benign. Checked via its full clone dot-debian (191):So the epoch-expiry quirk is upstream (it shows up even on plain Debian base accounts), but 903 can't produce the
degradedsymptom: it has no display manager, so nouser@<uid>.serviceis started for those accounts and PAM'saccountcheck is never reached. The Kali template is worse purely because it installs lightdm + ~12 more service packages, and lightdm is the one systemd lingers a user manager for.902 (ifrit's Kali) — not verified, near-certain. 902 lives on ifrit (not this node), has no running clone (its build is blocked by #790), and Saruman has no libguestfs for an offline disk read. But 902 shares 910's exact Kali preseed, so it will carry the identical full defect (lightdm + the Kali service accounts) and boot
degradedlike garuda did. Run this on ifrit when 902 is next built/booted:Fix scope: the
late_commandfix belongs in the sharedpacker/kali/preseed.cfg.pkrtpl(covers 910 + 902 in one change). 903/Debian doesn't need it for the symptom, though the same clear-epoch-expiry step would be harmless there too if we want base accounts clean.fix(packer): clear epoch account-expiry on Kali service accounts so c…
docs(runbook): record the Kali template epoch-expiry fix in analyst §…
docs(changelog): #1194's failure was the user manager's PAM step, not…