Skip to content

LDAP Result Code 2 "Protocol Error": 0000203D: LdapErr: DSID-0C0911AA, comment: Unknown extended request OID, data 0, v3839 #421

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

Closed
qoqozhang opened this issue Mar 8, 2023 · 0 comments

Comments

@qoqozhang
Copy link

qoqozhang commented Mar 8, 2023

use ldap with tls to change user password get error,but chang user attribute no problem.

conn, err = ldap.DialURL(fmt.Sprintf("ldap://%s:%d", ldap_host, ldap_port))
	if err != nil {
		log.Fatalf("dial connection error::::%v", err)
		return
	}
	err = conn.StartTLS(&tls.Config{
		InsecureSkipVerify: true,
	})
	if err != nil {
		log.Fatalf("ldap tls error::::%v", err)
	}
	err = conn.Bind(ldap_admin, ldap_pwd)
	if err != nil {
		log.Fatalf("bind admin user error::::%v", err)
	}
searchrequest := ldap.NewSearchRequest(
		baseDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, fmt.Sprintf(Filter, search_name, search_name), []string{}, []ldap.Control{})
	res, err := conn.Search(searchrequest)
	if err != nil {
		log.Fatalf("search error::::%v", err)
	}
	if len(res.Entries) != 1 {
		log.Fatalf("search username error::::%v", search_name)
	}

error is

LDAP Result Code 2 "Protocol Error": 0000203D: LdapErr: DSID-0C0911AA, comment: Unknown extended request OID, data 0, v3839
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant