Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

password expiration calculation #29

Open
gildasfleury opened this issue Aug 18, 2022 · 3 comments
Open

password expiration calculation #29

gildasfleury opened this issue Aug 18, 2022 · 3 comments
Labels

Comments

@gildasfleury
Copy link

gildasfleury commented Aug 18, 2022

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
@coudot coudot added the bug label Aug 18, 2022
@coudot
Copy link
Member

coudot commented Aug 18, 2022

Hard to see what you really changed, could you prove a pull request or a diff?

@gildasfleury
Copy link
Author

Arg I'm not allowed to clone project from github from Enterprise.
"# Ajusts time with delay" is already present on original script, I just changed the condition by these lines.

@coudot
Copy link
Member

coudot commented Aug 18, 2022

Ok, the check may indeed be wrong, I wonder why this has not been reported earlier. I need to test it before changing the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants