Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
base
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
puppetpublic
base
Commits
10f188fd
Commit
10f188fd
authored
8 years ago
by
Adam Seishas
Committed by
Karl Kornel
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
farmshare: Add support for pam_slurm
parent
4e9cb0b2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
manifests/ssh.pp
+13
-4
13 additions, 4 deletions
manifests/ssh.pp
manifests/ssh/pam.pp
+3
-2
3 additions, 2 deletions
manifests/ssh/pam.pp
templates/ssh/etc/pam.d/sshd.erb
+8
-0
8 additions, 0 deletions
templates/ssh/etc/pam.d/sshd.erb
with
24 additions
and
6 deletions
manifests/ssh.pp
+
13
−
4
View file @
10f188fd
...
@@ -15,8 +15,9 @@
...
@@ -15,8 +15,9 @@
# Default: false
# Default: false
class
base::ssh
(
class
base::ssh
(
$pam_afs
=
true
,
$pam_afs
=
true
,
$pam_duo
=
false
$pam_duo
=
false
,
$pam_slurm
=
false
){
){
# Install the openssh server package.
# Install the openssh server package.
...
@@ -33,10 +34,18 @@ class base::ssh(
...
@@ -33,10 +34,18 @@ class base::ssh(
}
}
}
}
# If we are using SLURM, install the module.
if
$pam_slurm
{
package
{
'libpam-slurm'
:
ensure
=>
installed
,
}
}
# Setup /etc/pam.d/sshd to require Duo on regular logins.
# Setup /etc/pam.d/sshd to require Duo on regular logins.
class
{
'ssh::pam'
:
class
{
'ssh::pam'
:
pam_afs
=>
$pam_afs
,
pam_afs
=>
$pam_afs
,
pam_duo
=>
$pam_duo
,
pam_duo
=>
$pam_duo
,
pam_slurm
=>
$pam_slurm
,
}
}
# Our default ssh rules allow connections from all of campus. This is
# Our default ssh rules allow connections from all of campus. This is
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh/pam.pp
+
3
−
2
View file @
10f188fd
...
@@ -6,8 +6,9 @@
...
@@ -6,8 +6,9 @@
# Currently, only Debian is supported when $pam_duo is true.
# Currently, only Debian is supported when $pam_duo is true.
class
ssh::pam
(
class
ssh::pam
(
$pam_afs
=
true
,
$pam_afs
=
true
,
$pam_duo
=
false
$pam_duo
=
false
,
$pam_slurm
=
false
){
){
# Configure PAM for sshd on RHEL 6.
# Configure PAM for sshd on RHEL 6.
...
...
This diff is collapsed.
Click to expand it.
templates/ssh/etc/pam.d/sshd.erb
+
8
−
0
View file @
10f188fd
...
@@ -30,7 +30,15 @@ account required pam_nologin.so
...
@@ -30,7 +30,15 @@ account required pam_nologin.so
# Uncomment and edit /etc/security/access.conf if you need to set complex
# Uncomment and edit /etc/security/access.conf if you need to set complex
# access limits that are hard to express in sshd_config.
# access limits that are hard to express in sshd_config.
# account required pam_access.so
# account required pam_access.so
<%
if
@pam_slurm
%>
# Allow access to SLURM compute nodes only if a user has an active job running
# there, but allow access to administrators using either their normal or .root
# identities.
account [success=1 default=ignore] pam_listfile.so item=user sense=allow file=/etc/security/rcadmins_all onerr=fail
account required /lib/security/pam_slurm.so
<%
end
%>
# Standard Un*x authorization.
# Standard Un*x authorization.
@include common-account
@include common-account
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment