# Unable to get w or who commands working after Debian 13 upgrade

**URL:** https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372
**Category:** Troubleshooting
**Created:** [3 August 2026 20:40 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372 "2026-08-03T20:40:12Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [3 August 2026 20:40 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/1 "2026-08-03T20:40:12Z")

</div>

### Creating a bug report/issue

I have searched the existing open and closed issues

#### Required Information

- DietPi version | `cat /boot/dietpi/.version`
  - G\_DIETPI\_VERSION\_CORE=10
  - G\_DIETPI\_VERSION\_SUB=5
  - G\_DIETPI\_VERSION\_RC=2
  - G\_GITBRANCH=‘master’
  - G\_GITOWNER=‘MichaIng’

- Distro version | `echo $G_DISTRO_NAME $G_RASPBIAN`
  - trixie 0

- Kernel version | `uname --all`
  - Linux trixienow 6.18.39+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.18.39-1+rpt1 (2026-07-29) aarch64 GNU/Linux

- Architecture | `dpkg --print-architecture`
  - arm64

- SBC model | `echo $G_HW_MODEL_NAME` or (EG: RPi3)
  - Raspberry Pi 4 Model B Rev 1.4

- Power supply used | (EG: 5V 1A RAVpower)
  - Official Raspberry Pi 4 AC Adapter

- SD card used | (EG: SanDisk ultra)
  - N/A as running only off USB hard drive

#### Additional Information (if applicable)

- Software title | (EG: Nextcloud)
  - Upgraded from Debian 12 to Debian 13

- Was the software title installed freshly or updated/migrated?
  - `w` and `who` were working before the upgrade

- Can this issue be replicated on a fresh installation of DietPi?
  - I believe so

- Bug report ID | `echo $G_HW_UUID`

#### Steps to reproduce

1. Upgrade Dietpi running Debian 12 (bookworm) to Debian 13 (trixie) using the script located at [Debian 13 Trixie has been released – DietPi Blog](https://dietpi.com/blog/?p=4014)
2. The above blog post mentions software to install to get the functionality back for `w` and `who`, but that does not work.
3. I do find [This Github issue mentioning how to get w and who working, but that does not work either](https://github.com/MichaIng/DietPi/issues/7644#issuecomment-3176790512).
4. Unable to have functional `w` and `who` commands as in Debian 12 (bookworm).

#### Expected behaviour

- `w` and `who` commands should function in Debian 13 (trixie) as they were in Debian 12 (bookworm).

#### Actual behaviour

- `w` and `who` commands are not functional after upgrading to Debian 13 (trixie).

#### Extra details

- N/A

```auto
paste lines of logs or code into such code fences here

```

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [3 August 2026 22:40 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/2 "2026-08-03T22:40:53Z")

</div>

See here below “1.3.2 lastlog and wtmp/utmp replacements”: [Debian 13 Trixie has been released – DietPi Blog](https://dietpi.com/blog/?p=4014#other-changes)

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [4 August 2026 01:59 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/3 "2026-08-04T01:59:26Z")

</div>

I read that and installed everything recommended as follows:

```auto
sudo apt install lastlog2 libpam-lastlog2 wtmpdb libpam-wtmpdb dbus
sudo systemctl unmask systemd-logind
sudo systemctl start dbus systemd-logind

```

But I’m confused as to how to get `w` and `who` functional. Do I just have `lastlog2` as their replacement?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [4 August 2026 12:22 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/4 "2026-08-04T12:22:42Z")

</div>

Oh, for these two, systemd PAM integration is needed, which we missed in the blog post:

```sh
sudo apt install libpam-systemd

```

This also means, that logins via Dropbear SSH server are not tracked, since it has no full PAM integration.

`lastlog2` and `wtmpdb` are both not needed for `w` and `who`.

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [6 August 2026 13:53 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/5 "2026-08-06T13:53:13Z")

</div>

Odd as that was already installed and neither `w` nor `who` are functioning as expected.

The output of `who` produces is nothing.

The output of `w` is :

```auto
$ w
 09:52:15 up 2 days, 17:26, 0 users, load average: 0.33, 0.37, 0.35
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

```

Any ideas what to try next?

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [6 August 2026 14:08 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/6 "2026-08-06T14:08:49Z")

</div>

As of my note about Dropbear: Do you use OpenSSH as SSH server, or does it not work on local console (HDMI) logins either?

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [6 August 2026 14:20 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/7 "2026-08-06T14:20:26Z")

</div>

I use OpenSSH, so I was expecting it to now function. It is running headless, so have been unable to test on local console (HDMI) login yet.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [6 August 2026 22:55 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/8 "2026-08-06T22:55:49Z")

</div>

Hmm. I just did this on a fresh DietPi system:

1. Switch to OpenSSH server in `dietpi-software`
2. 

```sh
 apt install libpam-systemd
 systemctl unmask systemd-logind
 systemctl start dbus systemd-logind
 exit

```

3. Reconnect via SSH, then:

```console
root@VM-Trixie:~# w
 00:53:55 up 3 min, 1 user, load average: 0.06, 0.10, 0.05
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/0 192.168.1.3 00:53 1.00s 0.02s ? w
root@VM-Trixie:~# who
root sshd pts/0 2026-08-07 00:53 (192.168.1.3)

```

If this really does not work in your case, verify that `systemd-logind` succeeded, and that you really connected through OpenSSH:

```sh
systemctl status systemd-logind
pgrep sshd-session
echo $PPID

```

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [7 August 2026 02:45 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/9 "2026-08-07T02:45:51Z")

</div>

I have followed the instructions you’ve provided and still having same issue in OP.

This system is not a fresh DietPi system, as it has been upgraded from Debian 11 → 12 → and now to 13. This functionality did work with the two previous Debian releases.

Here is what I get to verify that `systemd-logind` succeeded:

```auto
$ sudo systemctl status systemd-logind
● systemd-logind.service - User Login Management
     Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static)
    Drop-In: /usr/lib/systemd/system/systemd-logind.service.d
             └─dbus.conf
     Active: active (running) since Mon 2026-08-03 16:25:34 EDT; 3 days ago
 Invocation: 072b2ceca5d44331b71845bb5f313dad
       Docs: man:sd-login(3)
             man:systemd-logind.service(8)
             man:logind.conf(5)
             man:org.freedesktop.login1(5)
   Main PID: 362 (systemd-logind)
     Status: "Processing requests..."
      Tasks: 1 (limit: 9394)
   FD Store: 2 (limit: 768)
     Memory: 2.1M (peak: 2.8M)
        CPU: 1.319s
     CGroup: /system.slice/systemd-logind.service
             └─362 /usr/lib/systemd/systemd-logind

Aug 03 22:00:09 trixienow systemd-logind[362]: Session c1 logged out. Waiting for processes to exit.
Aug 03 22:00:09 trixienow systemd-logind[362]: Removed session c1.
Aug 03 22:00:19 trixienow systemd-logind[362]: Removed session 1.
Aug 04 08:32:25 trixienow systemd-logind[362]: New session c2 of user root.
Aug 04 08:32:25 trixienow systemd-logind[362]: New session 22 of user root.
Aug 04 08:41:10 trixienow systemd-logind[362]: Session c2 logged out. Waiting for processes to exit.
Aug 04 08:41:10 trixienow systemd-logind[362]: Removed session c2.
Aug 04 08:41:20 trixienow systemd-logind[362]: Removed session 22.
Aug 06 22:37:03 trixienow systemd-logind[362]: New session c3 of user root.
Aug 06 22:37:04 trixienow systemd-logind[362]: New session 99 of user root.

$ pgrep sshd-session
22327
22329
22438
22440

$ echo $PPID
22329

```

When I SSH in, I still do not see the login with `w`, but if I `sudo -i` to the root user after login, then I do see that, as shown here:

```auto
$ w
 22:42:58 up 3 days, 6:17, 0 users, load average: 0.51, 0.34, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
$ w
 22:43:03 up 3 days, 6:17, 1 user, load average: 0.47, 0.34, 0.24
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
root pts/1 - 22:43 7.00s 0.11s 0.04s sudo -i

```

This is unexpected behavior, so any suggestions on what to try next are greatly appreciated.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [7 August 2026 20:46 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/10 "2026-08-07T20:46:13Z")

</div>

I haven’t tested as non-root user yet. Let’s see:

```auto
dietpi@VM-Trixie:~$ w
 21:45:23 up 0 min, 1 user, load average: 0.14, 0.03, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
dietpi pts/1 192.168.1.3 21:45 2.00s 0.06s 0.02s w
dietpi@VM-Trixie:~$ who
dietpi sshd pts/1 2026-08-07 21:45 (192.168.1.3)

```

That `dietpi` user not in any additional groups either 🤔. Can you show the full `systemd-logind` output?

```auto
dietpi@VM-Trixie:~$ sudo journalctl -u systemd-logind
Aug 07 21:45:04 VM-Trixie systemd[1]: Starting systemd-logind.service - User Login Management...
Aug 07 21:45:04 VM-Trixie systemd-logind[422]: New seat seat0.
Aug 07 21:45:04 VM-Trixie systemd-logind[422]: Watching system buttons on /dev/input/event3 (Power Button)
Aug 07 21:45:04 VM-Trixie systemd-logind[422]: Watching system buttons on /dev/input/event4 (Sleep Button)
Aug 07 21:45:04 VM-Trixie systemd-logind[422]: Watching system buttons on /dev/input/event0 (AT Translated Set 2 keyboard)
Aug 07 21:45:04 VM-Trixie systemd[1]: Started systemd-logind.service - User Login Management.
Aug 07 21:45:21 VM-Trixie systemd-logind[422]: New session 1 of user dietpi.
Aug 07 21:45:21 VM-Trixie systemd-logind[422]: New session 2 of user dietpi.

```

It shows the `dietpi` user session being recognized. In your case I see only a `root` user session. But there were two prior sessions `1` and `c1`, from before the truncated log. `c1` and `c2` are also interesting session IDs. I see only numeric IDs, no matter how I login (local console, SSH, `sudo -i`) and with which user. And they are strictly serially counting up.

Also the `loginctl` gives an overview. If that does not show any `dietpi` user session, we know it is no registered in the first place.

Is a session registered when you run `sudo -i -u dietpi` (resp. the non-root user you use) from within the non-root user session?

Also, as you said the system has been dist-upgraded two times, this is how to check differences between your SSH server config and the default one, if there are any:

```sh
diff /etc/ssh/sshd_config /etc/ssh/sshd_config.dpkg-dist

```

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [10 August 2026 18:53 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/11 "2026-08-10T18:53:07Z")

</div>

Full `systemd-logind`output is:

```auto
$ sudo journalctl -u systemd-logind
Aug 10 14:28:53 trixienow systemd[1]: Starting systemd-logind.service - User Login Management...
Aug 10 14:28:53 trixienow systemd-logind[354]: New seat seat0.
Aug 10 14:28:53 trixienow systemd[1]: Started systemd-logind.service - User Login Management.
$ who
$ w
 14:29:23 up 0 min, 0 users, load average: 0.20, 0.05, 0.01
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT

```

Running `loginctl` does not show any `dietpi` user session:

```auto
$ loginctl
SESSION UID USER SEAT LEADER CLASS TTY IDLE SINCE
No sessions.

```

Result after running `sudo -i -u dietpi`

```auto
$ who
dietpi pts/0 2026-08-10 14:33
$ w
 14:33:14 up 4 min, 1 user, load average: 0.85, 0.54, 0.22
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
dietpi pts/0 - 14:33 1.00s 0.14s 0.03s sudo -i -u dietpi

```

I did not have a `sshd_config.dpkg-dist` file, but I had a different file there to diff against `sshd_config`

```auto
$ diff /etc/ssh/sshd_config /etc/ssh/sshd_config.ucf-dist 
1d0
< #	$OpenBSD: sshd_config,v 1.103 2018/04/09 20:41:22 tj Exp $
6c5
< # This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
---
> # This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
34c33
< PermitRootLogin no
---
> #PermitRootLogin prohibit-password
36c35
< MaxAuthTries 3
---
> #MaxAuthTries 6
57,63c56,64
< # To disable tunneled clear text passwords, change to no here!
< PasswordAuthentication no 
< PermitEmptyPasswords no
< 
< # Change to yes to enable challenge-response passwords (beware issues with
< # some PAM modules and threads)
< ChallengeResponseAuthentication no
---
> # To disable tunneled clear text passwords, change to "no" here!
> PasswordAuthentication no
> #PermitEmptyPasswords no
> 
> # Change to "yes" to enable keyboard-interactive authentication. Depending on
> # the system's configuration, this may involve passwords, challenge-response,
> # one-time passwords or some combination of these and other methods.
> # Beware issues with some PAM modules and threads.
> KbdInteractiveAuthentication no
79c80
< # be allowed through the ChallengeResponseAuthentication and
---
> # be allowed through the KbdInteractiveAuthentication and
81,82c82,83
< # PAM authentication via ChallengeResponseAuthentication may bypass
< # the setting of "PermitRootLogin without-password".
---
> # PAM authentication via KbdInteractiveAuthentication may bypass
> # the setting of "PermitRootLogin prohibit-password".
85,86c86,87
< # and ChallengeResponseAuthentication to 'no'.
< UsePAM no
---
> # and KbdInteractiveAuthentication to 'no'.
> UsePAM yes
103c104
< #PidFile /var/run/sshd.pid
---
> #PidFile /run/sshd.pid
112,113c113,114
< # Allow client to pass locale environment variables
< AcceptEnv LANG LC_*
---
> # Allow client to pass locale and color environment variables
> AcceptEnv LANG LC_* COLORTERM NO_COLOR

```

My sshd\_config file has not been changed since 2022, but I do notice one major difference here, which is `UsePAM` being different between them.

After changing `UsePAM` from `no` to `yes`, and restarting sshd, both `w` and `who` now work as expected. Thank you for helping me solve this issue.

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [10 August 2026 18:53 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/12 "2026-08-10T18:53:42Z")

</div>

# The TL;DR solution to this issue

After changing `UsePAM` from `no` to `yes`, and restarting sshd, both `w` and `who` now work as expected. Thank you for helping me solve this issue.

---

<div class="post-metadata">

### Author: ![MichaIng](https://dietpi.com/forum/user_avatar/dietpi.com/michaing/32/7_2.png) [@MichaIng](https://dietpi.com/forum/u/MichaIng)
#### Post date: [10 August 2026 19:54 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/13 "2026-08-10T19:54:41Z")

</div>

Oh, that makes sense. PAM is enabled by default in OpenSSH, hence I wasn’t considering this being disabled.

Something else I recognized is that your config still contains the legacy `ChallengeResponseAuthentication` setting, while our Trixie upgrade script should have replaced this with `KbdInteractiveAuthentication`. Can you run the following (long 😅) command and check whether it updates the setting?

```sh
[[-f '/etc/ssh/sshd_config']] && grep -q '^[[:blank:]]*ChallengeResponseAuthentication[[:blank:]]' /etc/ssh/sshd_config && ! grep -q '^[[:blank:]]*KbdInteractiveAuthentication[[:blank:]]' /etc/ssh/sshd_config && G_EXEC sed --follow-symlinks -Ei 's/^([[:blank:]]*)ChallengeResponseAuthentication([[:blank:]])/\1KbdInteractiveAuthentication\2/' /etc/ssh/sshd_config

```

Seeing all the comments which reference it, I think we should do a more aggressive replacement anyway:

```sh
G_EXEC sed --follow-symlinks -i 's/ChallengeResponseAuthentication/KbdInteractiveAuthentication/' /etc/ssh/sshd_config

```

---

<div class="post-metadata">

### Author: ![jgreyz](https://dietpi.com/forum/user_avatar/dietpi.com/jgreyz/32/9219_2.png) [@jgreyz](https://dietpi.com/forum/u/jgreyz)
#### Post date: [30 September 2026 17:51 UTC](https://dietpi.com/forum/t/unable-to-get-w-or-who-commands-working-after-debian-13-upgrade/25372/14 "2026-09-30T17:51:27Z")

</div>

I can confirm that running that long command does update the setting. Thank you again.
