-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Labels
Description
It seems that calculation for Mail sent before "password expiration" is wrong in this script. I modified as below
sending a mail to advise user to change its password
# Ajusts time with delay
WARNING_DELAY=`expr ${expireTime} - ${MY_MAIL_DELAY}`
if [[ ${diffTime} -lt ${pwdMaxAge} && ${currentTime} -gt ${WARNING_DELAY} ]]; then
Created a new category, a password change date but no policy applied. Could occurred probably when a user changed its policy. Here the default policy does not manage pwdmaxage so password will never expired (whereas user's password is wrongly raised as expired). To be adapted according each default policy configuration and pwdmaxage value.
# Go to next entry if pwdchangedtime BUT no passwordpolicy
if [ "${pwdChangedTime}" -a ! "${pwdPolicySubentry}" ]; then
echo "${MY_LOG_HEADER} well a password change date for ${login} but no password policy" >&2
continue
fi