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.
su - jack?systemctl --userworks.su - jackdidn't work either :(loginctl enable-lingerto make the user manager of a user start regardless of whether it has a session. When I also have some user service that starts e.g. tmux. Then I'll be able tosystemctl --userif I attach to the same tmux server (by settingTMUX_TMPDIR) aftersu -.