`users`, `who` and `w` commands are broken
users, who and w coomands do not list logged in users because systemd lacks UTMP feature support.
─────────────────────────────────────────────────────
DietPi v9.19.2 (beta) : 00:31 - Sun 11/16/2025
─────────────────────────────────────────────────────
- Device model : RPi 4 Model B (aarch64)
- Uptime : up 7 minutes
- CPU temp : 50 °C / 122 °F : Running warm, but safe
- RAM usage : 236 of 919 MiB (26%)
- Load average : 0.16, 0.18, 0.11 (4 cores)
- Disk usage (RootFS) : 21G of 58G (37%)
─────────────────────────────────────────────────────
❯ systemctl --version
systemd 257 (257.9-1~deb13u1)
+PAM +AUDIT +SELINUX +APPARMOR +IMA +IPE +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBCRYPTSETUP_PLUGINS +LIBFDISK +PCRE2 +PWQUALITY +P11KIT +QRENCODE +TPM2 +BZIP2 +LZ4 +XZ +ZLIB +ZSTD +BPF_FRAMEWORK +BTF -XKBCOMMON -UTMP +SYSVINIT +LIBARCHIVE
❯ users
❯ who
❯ w
00:32:18 up 7 min, 0 users, load average: 0.11, 0.17, 0.11
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
❯ ls /var/run/utmp
ls: cannot access '/var/run/utmp': No such file or directory
❯ ls /var/run/utmpx
ls: cannot access '/var/run/utmpx': No such file or directory
Yes that is a known change with Debian Trixie: classic wtmp has been removed, since it is inherently not Year 2038 safe. wtmpdb and lastlog2 (for lastlog command) are the replacements. I am not 100% sure whether it is fully up-to-date, but here the related wiki entry: https://wiki.debian.org/pam_lastlog2%20and%20wtmpdb
w and who should work with wtmpdb.
That's interesting. Thank you.
That information is actually missing in our Trixie article: https://dietpi.com/blog/?p=4014#other-changes
Note-to-myself to add this tomorrow.