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

Connection error: LDAP Result Code 2 "Protocol Error": unsupported extended operation #16

Closed
cmadarsh opened this issue May 31, 2022 · 3 comments

Comments

@cmadarsh
Copy link

cmadarsh commented May 31, 2022

Hello,

When trying connection to LDAP server setup on linux, facing connection error.

Error: "Connection error: LDAP Result Code 2 "Protocol Error": unsupported extended operation"

Note that with same client, we are able to connect to LDAP on Windows server.

Configs/versions we are using are as below:

Client OS Details:

NAME=Buildroot
VERSION=2015.11-00069-g85a7c28e
ID=buildroot
VERSION_ID=2015.11
PRETTY_NAME="Buildroot 2015.11"
MVEBU_RELEASE="16.08.0"

Linux OS details on which LDAP is setup:

NAME="Ubuntu"
VERSION="18.04.4 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.4 LTS"
VERSION_ID="18.04"

OpenLDAP Version:
Version: 2.4.45+dfsg-1ubuntu1.11

Using golang v3.1.4 version of go-ad-auth:
https://pkg.go.dev/github.com/korylprince/go-ad-auth/v3@v3.1.4

Using this with Port 389 and SecurityType SecurityInsecureStartTLS for LDAP connection.
Note that port is open, no issues with firewall

API function call being used is: https://pkg.go.dev/github.com/korylprince/go-ad-auth/v3@v3.1.4#AuthenticateExtended

Could you please advice on this issue? Is it something with respect to versions we are using?

@korylprince
Copy link
Owner

This is not a general purpose LDAP library. For that you should use the go-ldap library, which this is built on.

This library makes several assumptions (attributes, connection methods, search parameters) specific to Active Directory.

@cmadarsh
Copy link
Author

cmadarsh commented May 31, 2022

So you mean, we cannot connect to LDAP if it is on linux server, with this library?

@korylprince
Copy link
Owner

You can only use this library to connect to Active Directory. You can't use it to connect to OpenLDAP, SSSD, etc (at least, it's untested and unsupported).

The OS where you're running the code doesn't matter (as long as Go supports it).

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

2 participants