Skip to content

Commit 5ec76f4

Browse files
author
Patrick Meier
committed
Merge pull request #18 from bkw/reenablePam
passwordless users not able to log in
2 parents 43326a2 + 8d9ad45 commit 5ec76f4

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

attributes/default.rb

+1
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,4 @@
4747
default['ssh']['allow_root_with_key'] = false # sshd
4848
default['ssh']['allow_tcp_forwarding'] = false # sshd
4949
default['ssh']['allow_agent_forwarding'] = false # sshd
50+
default['ssh']['use_pam'] = false # sshd

templates/default/opensshd.conf.erb

+2-1
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ IgnoreUserKnownHosts yes
102102
RhostsRSAAuthentication no
103103
HostbasedAuthentication no
104104

105+
# Enable PAM to enforce system wide rules
106+
UsePAM <%= ((@node['ssh']['use_pam']) ? "yes" : "no" ) %>
105107
# Disable password-based authentication, it can allow for potentially easier brute-force attacks.
106-
UsePAM no
107108
PasswordAuthentication no
108109
PermitEmptyPasswords no
109110
ChallengeResponseAuthentication no

0 commit comments

Comments
 (0)