Issues with systemctl when logging in via teleport

Hey there, so I’ve noticed some issues when logging in via teleport to a system. Specifically it seems XDG_RUNTIME_DIR isn’t being set which tends to break systemctl user services for me.

I’m half wondering if this could be PAM related as I vaguely recall PAM being somewhere in the stack for that feature.

If PAM could be related how does one build teleport with PAM support, I haven’t found any info on it.

All Teleport binaries that we (Gravitational) distribute should be compiled with PAM support in already.

This could be a PAM-related problem - you should be able to enable PAM support with the sshd stack to confirm. The section of the docs that deals with how to configure/enable PAM is here -

Hi there,

To be precise I’m not using the distributed binaries but compiling from master.

So I’m not sure those instructions would suffice.
I’ve already enabled Pam in my config file however the daemon reports that Pam support is not enabled/compiled in.

You’ll need PAM headers installed to have support compiled in. On Ubuntu/Debian I think this is apt-get install libpam-dev, on RHEL/CentOS/Fedora it should be yum install pam-devel. For other distros you can figure it out. If you look at the output when compiling you should see -tags "pam" in the output.