From d32fa1c8312cab5a552cb02eb2ff88250ff06474 Mon Sep 17 00:00:00 2001 From: Jordi Prats Date: Wed, 17 Apr 2019 17:25:39 +0200 Subject: [PATCH] bugfix --- CHANGELOG.md | 4 ++++ manifests/params.pp | 3 ++- metadata.json | 2 +- templates/logindefs/logindefs.erb | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b7bb84..53c7a44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 0.1.3 + +* bugfix Ubuntu 16.06 **login.defs** + ## 0.1.2 * Added Ubunut 18.04 support diff --git a/manifests/params.pp b/manifests/params.pp index 6fcf025..34654d7 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,6 +1,5 @@ class shadow::params { - $pass_min_len_default='5' $pass_warn_age_default='7' if(hiera('eypshadow::hardening', false)) @@ -23,6 +22,7 @@ { $package_name='shadow-utils' $maildir_default = '/var/spool/mail' + $pass_min_len_default='5' case $::operatingsystemrelease { /^[5-6].*$/: @@ -44,6 +44,7 @@ } 'Debian': { + $pass_min_len_default=undef case $::operatingsystem { 'Ubuntu': diff --git a/metadata.json b/metadata.json index 56c8e0e..2dac713 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "eyp-shadow", - "version": "0.1.2", + "version": "0.1.3", "author": "eyp", "summary": "manages useradd and login.defs defaults", "license": "Apache-2.0", diff --git a/templates/logindefs/logindefs.erb b/templates/logindefs/logindefs.erb index a48904c..14d66bb 100644 --- a/templates/logindefs/logindefs.erb +++ b/templates/logindefs/logindefs.erb @@ -16,8 +16,10 @@ PASS_MAX_DAYS <%= @pass_max_days %> # PASS_MIN_DAYS Minimum number of days allowed between password changes. PASS_MIN_DAYS <%= @pass_min_days %> +<% if defined?(@pass_min_len) -%> # PASS_MIN_LEN Minimum acceptable password length. PASS_MIN_LEN <%= @pass_min_len %> +<% end -%> # PASS_WARN_AGE Number of days warning given before a password expires. PASS_WARN_AGE <%= @pass_warn_age %>