File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
rockylinux9/files/usr/local/bin
ubuntu24.04/files/usr/local/bin Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -95,11 +95,13 @@ function addConfItem() {
9595 export SLURMD_OPTIONS=" ${slurmdOptions[*]} "
9696}
9797
98- # Configure PAM for pam_slurm_adopt (following login's dynamic pattern)
98+ # configure_pam configures PAM to use pam_slurm_adopt for SSH sessions.
99+ #
100+ # This allows SSH access to be restricted to users with active jobs on the node.
99101function configure_pam() {
100102 # Add pam_slurm_adopt to SSH PAM configuration if not already present
101103 if ! grep -q " pam_slurm_adopt.so" /etc/pam.d/sshd 2> /dev/null; then
102- # Insert after common- account include
104+ # Insert after account include password-auth (Rocky Linux specific pattern)
103105 sed -i ' /^account[[:space:]]*include[[:space:]]*password-auth/a -account required pam_slurm_adopt.so action_no_jobs=deny action_unknown=newest action_adopt_failure=deny action_generic_failure=deny disable_x11=0' /etc/pam.d/sshd
104106 fi
105107}
Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ function addConfItem() {
9595 export SLURMD_OPTIONS=" ${slurmdOptions[*]} "
9696}
9797
98- # Configure PAM for pam_slurm_adopt (following login's dynamic pattern)
98+ # configure_pam configures PAM to use pam_slurm_adopt for SSH sessions.
99+ #
100+ # This allows SSH access to be restricted to users with active jobs on the node.
99101function configure_pam() {
100102 # Add pam_slurm_adopt to SSH PAM configuration if not already present
101103 if ! grep -q " pam_slurm_adopt.so" /etc/pam.d/sshd 2> /dev/null; then
You can’t perform that action at this time.
0 commit comments