Compare commits

...

1 Commits

Author SHA1 Message Date
Clemens Schwaighofer
8452a1b8c0 Fix pre check for ssh login checks 2023-12-21 13:35:50 +09:00

View File

@@ -155,7 +155,7 @@ for ssh_group in ${ssh_groups[@]}; do
found=$(grep "${username};" "${AUTH_LOG}");
fi;
# always pre work account dates if they exist, but output only if text
if [ ! -z "${user_create_date_string}" ]; then
if [ -z "${found}" ] && [ ! -z "${user_create_date_string}" ]; then
user_create_date=$(echo "${user_create_date_string}" | date +"%s" -f -);
# if all empty, we continue with only check if user has last login date
# else get days since creation