Skip to content

Commit 3b7b912

Browse files
SyntaxRulesSyntaxRules
authored andcommitted
feat(post): restricting user access via slurm
1 parent 013b9d5 commit 3b7b912

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

_posts/2017-2-14-restrict-user-access-in-slurm.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ Using centos 7.x you'll need to edit two files (both in the compute node image a
1111

1212
Where $CHROOT is the location to your image. Edit the files like so:
1313

14-
Edit $CHROOT/etc/pam.d/password-auth:
14+
Edit $CHROOT/etc/pam.d/password-auth:
15+
1516
```
1617
account required pam_unix.so
1718
account required pam_slurm.so # Add this line, below pam_unix.so, but above everything else
@@ -20,7 +21,8 @@ account sufficient pam_succeed_if.so uid < 500 quiet
2021
account required pam_permit.so
2122
```
2223

23-
Edit $CHROOT/etc/security/access.conf:
24+
Edit $CHROOT/etc/security/access.conf:
25+
2426
```
2527
# All other users should be denied to get access from all sources.
2628
+ : root : ALL # Uncomment or add this line at the bottom of the file
@@ -30,6 +32,7 @@ Edit $CHROOT/etc/security/access.conf:
3032
Now rebuild and apply your image/vnfs to the nodes. (Not covered here.)
3133

3234
Test it out:
35+
3336
```
3437
[sr@sms ~]$ ssh compute-1
3538
Access denied: user sr (uid=1) has no active jobs on this node.

0 commit comments

Comments
 (0)