Aurelien,

there is already a pam/slurm plugin to prevent users from logging into a 
node where they do not have a job running.
https://github.com/SchedMD/slurm/blob/master/contribs/pam/pam_slurm.c
i guess you can customize this plugin to fit your need.

note that once users log in (when no job is running), nothing prevent 
SLURM from starting a job on this node, and there is no mechanism to log 
out these users.

Cheers,

Gilles

----- Original Message -----
> 
> Hi all, 
> 
> I’d like to have all my users being able to SSH to the compute nodes 
when -nobody- has an active allocation on the node. I’d like to still 
use PAM access control to prevent users logging into compute nodes that 
are allocated through Slurm. 
> 
> I have made experiments with this and found easily how to make the pam 
module prevent non-allocated users access. 
> However, users are also prevented to login at all time, even when no 
work is active on a node. 
> 
> The typical workload for this machine is mostly debugging/shared jobs, 
with (occasional) exclusive batch jobs. I can also appreciate advises on 
a more Slurmy workflow for that type of usage pattern. 
> 
> Best, 
> Aurelien
> --
> Aurélien Bouteiller, Ph.D. ~~ https://icl.cs.utk.edu/~bouteill/
> 

Reply via email to