Ssh – /run/user/$UID not created

pamsshsystemd

I have a cluster where users login via ssh to the head node. On the head node /run/user/$UID directories are created via pam_systemd.so, as expected. Subsequently, users can then log into a compute node, again via ssh. On the compute node, however, /run/user/$UID directories are not created (except for one for root), although the systemd-logind service is running.

Any ideas what the problem might be?

Best Answer

My description of the situation was inaccurate. In fact the user was not logging into the compute node via ssh but using Slurm's srun command to start a remote shell. This command allocates resources and performs the authentication via munge and apparently sidesteps PAM. If, however, the user just reserves resources via salloc and then uses ssh to log into the allocated compute node, then PAM kicks in and /run/user/$UID is created, as expected.

Related Topic