When I use ssh to log in to the root user on my server, an entry 0 is created in /var/run/user because pam_systemd tells systemd-logind to do this. This is an indicator that a user session has been started for uid 0.
Then, when I run su jack, I still only see the 0 entry in /var/run/user; no entry has been made for this session.
However, journalctl shows that a pam session was opened, and /etc/pam.d/su includes common-session, which adds session optional pam_systemd.so. So I think that a user session should have been created.
How can I make su create a user session?
If it's relevant, I'm on Debian 11.