[PATCH 04/22] Added remediation
Shawn Wells
shawn.d.wells at gmail.com
Mon Sep 16 01:31:00 UTC 2013
-------------- next part --------------
>From 3873ba825a4b10c7f27c22d457fa4c2f6b958a9b Mon Sep 17 00:00:00 2001
From: Shawn Wells <shawn at redhat.com>
Date: Wed, 11 Sep 2013 19:18:50 -0400
Subject: [PATCH 04/22] Added remediation: accounts_maximum_age_login_defs
---
.../fixes/bash/accounts_maximum_age_login_defs.sh | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
create mode 100644 RHEL6/input/fixes/bash/accounts_maximum_age_login_defs.sh
diff --git a/RHEL6/input/fixes/bash/accounts_maximum_age_login_defs.sh b/RHEL6/input/fixes/bash/accounts_maximum_age_login_defs.sh
new file mode 100644
index 0000000..968b7c0
--- /dev/null
+++ b/RHEL6/input/fixes/bash/accounts_maximum_age_login_defs.sh
@@ -0,0 +1,8 @@
+source ./templates/support.sh
+populate var_password_max_age
+
+grep -q ^PASS_MAX_DAYS /etc/login.defs && \
+ sed -i "s/PASS_MAX_DAYS.*/PASS_MAX_DAYS $var_password_max_age/g" /etc/login.defs
+if ! [ $? -eq 0 ]; then
+ echo "PASS_MAX_DAYS $var_password_max_age"
+fi
--
1.7.1
More information about the scap-security-guide
mailing list