From af4c047896ad16bb09c9f43cccefaf3483fda462 Mon Sep 17 00:00:00 2001 From: jonnyCodev Date: Wed, 5 Feb 2020 17:21:17 +0200 Subject: [PATCH] check root account access login and fail if used in the last day --- checks/check11 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/checks/check11 b/checks/check11 index 88770ece0b..91199e27d9 100644 --- a/checks/check11 +++ b/checks/check11 @@ -21,8 +21,9 @@ check11(){ arn=$(cat $TEMP_REPORT_FILE|awk -F, '{ print $1,$2 }' |grep '' | awk '{ print $2 }') days_not_in_use=$(how_many_days_from_today ${last_login_date%T*}) - textInfo "Root account last accessed (password key_1 key_2): $last_login_date" if [ "$days_not_in_use" -gt "$MAX_DAYS" ];then textFail "Root Account $arn last accessed was less then ${MAX_DAYS#-} days ago" + else + textPass "Root Account $arn last accessed was more then ${MAX_DAYS#-} days ago" fi }