Skip to content

Commit

Permalink
Merge pull request #30 from jordiprats/master
Browse files Browse the repository at this point in the history
0.1.24
  • Loading branch information
jordiprats authored Feb 11, 2020
2 parents de4abe3 + f52ab38 commit 92f835c
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 0.1.24

* **pam::lockout**
- added support for **Ubuntu 18.04**

## 0.1.23

* Added support for **RHEL 8**
Expand Down
11 changes: 11 additions & 0 deletions examples/cis_demo.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class { 'pam::lockout': }

class { 'pam::wheel': }

class { 'pam::cracklib':
minlen => '7',
}

class { 'pam::unix':
remember => '10',
}
1 change: 1 addition & 0 deletions examples/lockout.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
class { 'pam::lockout': }
14 changes: 14 additions & 0 deletions manifests/lockout/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,20 @@
}
}
}
'tally2':
{
# sed 's/\(^account.*pam_unix\.so.*$\)/\naccount required pam_tally2.so\n\n\1\n/'
exec { 'update common account':
command => "sed 's/\\(^account.*pam_unix\\.so.*$\\)/\\naccount required pam_tally2.so\\n\\n\\1\\n/' -i /etc/pam.d/common-account",
unless => "grep -P 'account required pam_tally2.so' /etc/pam.d/common-account",
}

# /etc/pam.d/common-auth
exec { 'update common auth':
command => "sed 's/\\(^auth.*pam_unix\\.so.*$\\)/auth required pam_tally2.so deny=${pam::lockout::deny_failed} unlock_time=${pam::lockout::unlock_time}\\n\\n\\1/' -i /etc/pam.d/common-auth",
unless => "grep -E 'auth required pam_tally2.so deny=${pam::lockout::deny_failed} unlock_time=${pam::lockout::unlock_time}' /etc/pam.d/common-auth",
}
}
default:
{
fail("${pam::params::pam_lockout} currently not implemented")
Expand Down
3 changes: 3 additions & 0 deletions manifests/lockout/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
'faillock':
{
}
'tally2':
{
}
default:
{
fail("${pam::params::pam_lockout} currently not implemented")
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eyp-pam",
"version": "0.1.23",
"version": "0.1.24",
"author": "eyp",
"summary": "PAM modules, /etc/security/limits.conf and /etc/securetty management",
"license": "Apache-2.0",
Expand Down

0 comments on commit 92f835c

Please sign in to comment.