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
5c5edd9e
Commit
5c5edd9e
authored
8 years ago
by
Karl Kornel
Browse files
Options
Downloads
Patches
Plain Diff
ssh: Add support for not using AFS in the PAM stack.
parent
484eda3c
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
+7
-0
7 additions, 0 deletions
manifests/ssh.pp
manifests/ssh/pam.pp
+1
-0
1 addition, 0 deletions
manifests/ssh/pam.pp
templates/ssh/etc/pam.d/sshd.erb
+4
-0
4 additions, 0 deletions
templates/ssh/etc/pam.d/sshd.erb
with
12 additions
and
0 deletions
manifests/ssh.pp
+
7
−
0
View file @
5c5edd9e
...
...
@@ -3,6 +3,11 @@
# system, we lock connections down to campus with iptables by default, and we
# have a few subclasses that allow things like host keys.
# If you are using AFS, then you can have pam_afs_session placed into the
# PAM authentication chain. You should disable this on systems that aren't
# using OpenAFS.
# Default: true
# If you want to require Duo on login, set pam_duo to true. This flag will
# load the appropriate Duo code (via base::duo) and change the sshd_config
# file so that Duo is required for non-root logins. If you want Duo for
...
...
@@ -10,6 +15,7 @@
# Default: false
class
base::ssh
(
$pam_afs
=
true
,
$pam_duo
=
false
){
...
...
@@ -29,6 +35,7 @@ class base::ssh(
# Setup /etc/pam.d/sshd to require Duo on regular logins.
class
{
'ssh::pam'
:
pam_afs
=>
$pam_afs
,
pam_duo
=>
$pam_duo
,
}
...
...
This diff is collapsed.
Click to expand it.
manifests/ssh/pam.pp
+
1
−
0
View file @
5c5edd9e
...
...
@@ -6,6 +6,7 @@
# Currently, only Debian is supported when $pam_duo is true.
class
ssh::pam
(
$pam_afs
=
true
,
$pam_duo
=
false
){
...
...
This diff is collapsed.
Click to expand it.
templates/ssh/etc/pam.d/sshd.erb
+
4
−
0
View file @
5c5edd9e
...
...
@@ -9,12 +9,16 @@
# credential), then "jump over" the pam_duo module to step 3. If not,
# go to the next module in the stack (2).
# 2. If the user is _not_ root, require Duo.
<%
if
@pam_afs
%>
# 3. Set up the AFS session and then, whether the AFS sesssion setup works
# or not, quit the pam stack
<%
end
%>
auth [success=1 default=ignore] pam_succeed_if.so uid eq 0
auth required pam_duo.so conf=/etc/security/pam_duo_ssh.conf
<%
if
@pam_afs
%>
auth [success=done default=die] pam_afs_session.so
<%
end
%>
##############################################################################
# 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