Skip to content

LDAP Result Code 49 - BindDN should have only one or two parts #252

@greenpau

Description

@greenpau

I working on the integration with GLAuth in greenpau/caddy-security#32

The LDAP library used is github.com/go-ldap/ldap/v3 v3.4.1.

Working with the sample-simple.cfg provided in the getting started.

The binding does not quite work.

As user. I get: LDAP Result Code 49 "Invalid Credentials":

In GLAuth logs I see: BindDN should have only one or two parts

18:11:40.997631 Bind ▶ DEBU 023  "level"=6 "msg"="Bind request"  "basedn"="dc=glauth,dc=com" "binddn"="cn=serviceuser,ou=svcaccts,dc=glauth,dc=com" "src"={"IP":"127.0.0.1","Port":56898,"Zone":""}
18:11:40.997681 Bind ▶ DEBU 024  "level"=6 "msg"="Bind success"  "binddn"="cn=serviceuser,ou=svcaccts,dc=glauth,dc=com" "src"={"IP":"127.0.0.1","Port":56898,"Zone":""}
18:11:40.998060 Search ▶ DEBU 025  "level"=6 "msg"="Search request"  "basedn"="dc=glauth,dc=com" "binddn"="cn=serviceuser,ou=svcaccts,dc=glauth,dc=com" "filter"="(\u0026(|(uid=johndoe)(mail=johndoe))(objectClass=posixAccount))" "scope"=2 "searchbasedn"="dc=glauth,dc=com" "src"={"IP":"127.0.0.1","Port":56898,"Zone":""}
18:11:40.998076 searchMaybeTopLevelNodes ▶ DEBU 026  "level"=6 "msg"="Search request"  "special case"="top-level browse"
18:11:40.998131 searchMaybeTopLevelNodes ▶ DEBU 027  "level"=6 "msg"="AP: Top-Level Browse OK"  "filter"="(\u0026(|(uid=johndoe)(mail=johndoe))(objectClass=posixAccount))"
18:11:40.998388 Bind ▶ DEBU 028  "level"=6 "msg"="Bind request"  "basedn"="dc=glauth,dc=com" "binddn"="cn=johndoe,ou=superheros,ou=users,dc=glauth,dc=com" "src"={"IP":"127.0.0.1","Port":56898,"Zone":""}
18:11:40.998404 findUser ▶ WARN 029  "level"=2 "msg"="BindDN should have only one or two parts"  "binddn"="cn=johndoe,ou=superheros,ou=users,dc=glauth,dc=com" "numparts"=3

Please assist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions