Well here goes, first time I've ever made an attempt to submit a patch to any open source project!
I was testing some of the generated fix content and ran into an error when running user utilities(useradd/userdel) that used read /etc/login.defs, "configuration error - unknown item 'PASS_WARN_DAYS' (notify administrator)".
Looking at /etc/login.defs looks like "PASS_WARN_DAYS 7" was added to the end of login.defs, and I belive this should have been PASS_WARN_AGE. Looks like this was just a typo in the RHEL6/input/fixes/bash/accounts_password_warn_age_login.defs.sh, change PASS_WARN_DAYS to PASS_WARN_AGE, remade the guide, generated new fix content and ran it, and looks like /etc/login.defs is good, and error didn't return when running any user utils on RHEL 6.4
Hopefully I did everything correctly, if not please let me know. Also I won't be able to push anything to the git repo, so if this patch is good, if someone that can push the patch would, it would be appreciated.
Thanks!
Jeb Trayer, CTR USCG Operations System Center Jeb.D.Trayer@uscg.mil
Signed-off-by: Jeb Trayer jeb.d.trayer@uscg.mil --- .../bash/accounts_password_warn_age_login_defs.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh index 250b141..83ba76e 100644 --- a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh +++ b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh @@ -1,8 +1,8 @@ source ./templates/support.sh populate var_accounts_password_warn_age_login_defs
-grep -q ^PASS_WARN_DAYS /etc/login.defs && \ - sed -i "s/PASS_WARN_DAYS.*/PASS_WARN_DAYS $var_accounts_password_warn_age_login_defs/g" /etc/login.defs +grep -q ^PASS_WARN_AGE /etc/login.defs && \ + sed -i "s/PASS_WARN_AGE.*/PASS_WARN_AGE $var_accounts_password_warn_age_login_defs/g" /etc/login.defs if ! [ $? -eq 0 ]; then - echo "PASS_WARN_DAYS $var_accounts_password_warn_age_login_defs" >> /etc/login.defs + echo "PASS_WARN_AGE $var_accounts_password_warn_age_login_defs" >> /etc/login.defs fi
Hello Jeb,
----- Original Message -----
From: "Jeb D CTR Trayer" Jeb.D.Trayer@uscg.mil To: scap-security-guide@lists.fedorahosted.org Sent: Friday, November 22, 2013 3:10:03 PM Subject: [PATCH] typo in accounts_password_warn_age_login_defs.sh
Well here goes, first time I've ever made an attempt to submit a patch to any open source project!
I was testing some of the generated fix content and ran into an error when running user utilities(useradd/userdel) that used read /etc/login.defs, "configuration error - unknown item 'PASS_WARN_DAYS' (notify administrator)".
Looking at /etc/login.defs looks like "PASS_WARN_DAYS 7" was added to the end of login.defs, and I belive this should have been PASS_WARN_AGE.
Thanks, this is truly right (should be PASS_WARN_AGE instead of PASS_WARN_DAYS). Fedora even has it correctly: https://git.fedorahosted.org/cgit/scap-security-guide.git/tree/Fedora/input/...
but me failed to recheck the RHEL6 case when making Fedora version.
Thank you for pointing out! ACK for push from me (will leave the actual push to Shawn).
Thank you && Regards, Jan. -- Jan iankko Lieskovsky / Red Hat Security Technologies Team
Looks like this was just a typo in the RHEL6/input/fixes/bash/accounts_password_warn_age_login.defs.sh, change PASS_WARN_DAYS to PASS_WARN_AGE, remade the guide, generated new fix content and ran it, and looks like /etc/login.defs is good, and error didn't return when running any user utils on RHEL 6.4
Hopefully I did everything correctly, if not please let me know. Also I won't be able to push anything to the git repo, so if this patch is good, if someone that can push the patch would, it would be appreciated.
Thanks!
Jeb Trayer, CTR USCG Operations System Center Jeb.D.Trayer@uscg.mil
Signed-off-by: Jeb Trayer jeb.d.trayer@uscg.mil
.../bash/accounts_password_warn_age_login_defs.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh index 250b141..83ba76e 100644 --- a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh +++ b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh @@ -1,8 +1,8 @@ source ./templates/support.sh populate var_accounts_password_warn_age_login_defs
-grep -q ^PASS_WARN_DAYS /etc/login.defs && \
- sed -i "s/PASS_WARN_DAYS.*/PASS_WARN_DAYS
$var_accounts_password_warn_age_login_defs/g" /etc/login.defs +grep -q ^PASS_WARN_AGE /etc/login.defs && \
- sed -i "s/PASS_WARN_AGE.*/PASS_WARN_AGE
$var_accounts_password_warn_age_login_defs/g" /etc/login.defs if ! [ $? -eq 0 ]; then
- echo "PASS_WARN_DAYS $var_accounts_password_warn_age_login_defs" >>
/etc/login.defs
- echo "PASS_WARN_AGE $var_accounts_password_warn_age_login_defs" >>
/etc/login.defs fi -- 1.7.1 _______________________________________________ scap-security-guide mailing list scap-security-guide@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide
On 11/22/13, 9:26 AM, Jan Lieskovsky wrote:
Hello Jeb,
----- Original Message -----
From: "Jeb D CTR Trayer" Jeb.D.Trayer@uscg.mil To: scap-security-guide@lists.fedorahosted.org Sent: Friday, November 22, 2013 3:10:03 PM Subject: [PATCH] typo in accounts_password_warn_age_login_defs.sh
Well here goes, first time I've ever made an attempt to submit a patch to any open source project!
I was testing some of the generated fix content and ran into an error when running user utilities(useradd/userdel) that used read /etc/login.defs, "configuration error - unknown item 'PASS_WARN_DAYS' (notify administrator)".
Looking at /etc/login.defs looks like "PASS_WARN_DAYS 7" was added to the end of login.defs, and I belive this should have been PASS_WARN_AGE.
Thanks, this is truly right (should be PASS_WARN_AGE instead of PASS_WARN_DAYS). Fedora even has it correctly: https://git.fedorahosted.org/cgit/scap-security-guide.git/tree/Fedora/input/...
but me failed to recheck the RHEL6 case when making Fedora version.
Thank you for pointing out! ACK for push from me (will leave the actual push to Shawn).
Thanks for the bugfix! Pushed: https://git.fedorahosted.org/cgit/scap-security-guide.git/commit/?id=8bdcac6...
Thank you && Regards, Jan.
Jan iankko Lieskovsky / Red Hat Security Technologies Team
Looks like this was just a typo in the RHEL6/input/fixes/bash/accounts_password_warn_age_login.defs.sh, change PASS_WARN_DAYS to PASS_WARN_AGE, remade the guide, generated new fix content and ran it, and looks like /etc/login.defs is good, and error didn't return when running any user utils on RHEL 6.4
Hopefully I did everything correctly, if not please let me know. Also I won't be able to push anything to the git repo, so if this patch is good, if someone that can push the patch would, it would be appreciated.
Thanks!
Jeb Trayer, CTR USCG Operations System Center Jeb.D.Trayer@uscg.mil
Signed-off-by: Jeb Trayer jeb.d.trayer@uscg.mil
.../bash/accounts_password_warn_age_login_defs.sh | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh index 250b141..83ba76e 100644 --- a/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh +++ b/RHEL6/input/fixes/bash/accounts_password_warn_age_login_defs.sh @@ -1,8 +1,8 @@ source ./templates/support.sh populate var_accounts_password_warn_age_login_defs
-grep -q ^PASS_WARN_DAYS /etc/login.defs && \
- sed -i "s/PASS_WARN_DAYS.*/PASS_WARN_DAYS
$var_accounts_password_warn_age_login_defs/g" /etc/login.defs +grep -q ^PASS_WARN_AGE /etc/login.defs && \
- sed -i "s/PASS_WARN_AGE.*/PASS_WARN_AGE
$var_accounts_password_warn_age_login_defs/g" /etc/login.defs if ! [ $? -eq 0 ]; then
- echo "PASS_WARN_DAYS $var_accounts_password_warn_age_login_defs" >>
/etc/login.defs
- echo "PASS_WARN_AGE $var_accounts_password_warn_age_login_defs" >>
/etc/login.defs fi -- 1.7.1 _______________________________________________ scap-security-guide mailing list scap-security-guide@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide
scap-security-guide mailing list scap-security-guide@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/scap-security-guide
scap-security-guide@lists.fedorahosted.org