You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To be explicit; this report is that when the server requires a password change, binding with a simple bind request and a ldap.NewControlBeheraPasswordPolicy() generated control, there is an error about decoding data rather than the expected error about needing to change the password.
I haven't investigated the reason for this but it took me a few minutes of reading to decode this bug report, so I wanted to add my perspective for someone else to solve.
zach593
added a commit
to zach593/ldap
that referenced
this issue
Jul 17, 2020
with ldapwhoami i get ”Password must be changed“
$ ldapwhoami -x -D "cn=shilei1,cn=ops,ou=IT,dc=yzh,dc=com" -w shilei -h localhost -p 589 -e ppolicy -v
ldap_initialize( ldap://localhost:589 )
ldap_bind: Success (0); Password must be changed (Password expires in 0 seconds)
dn:cn=shilei1,cn=Ops,ou=IT,dc=yzh,dc=com
Result: Success (0)
but with
controls := []ldap.Control{}
controls = append(controls, ldap.NewControlBeheraPasswordPolicy())
bindRequest := ldap.NewSimpleBindRequest("cn=shilei1,cn=Ops,ou=IT,dc=yzh,dc=com", "shilei", controls)
r, err := l.SimpleBind(bindRequest)
err get :failed to decode child control: failed to decode data bytes: unexpected EOF
The text was updated successfully, but these errors were encountered: