Skip to content

"Operation unavailable without authentication" when using GSSAPI bind #275

@JonathonReinhart

Description

@JonathonReinhart

I'm running a Samba 4 domain controller (version 4.9.4-Debian).

  • Operating system: Debian Buster
  • Python version: Python 3.7.3rc1
  • python-ldap version: 3.2.0

I can successfully use ldapsearch with GSSAPI SASL authentication to search for users:

$ kinit someone
...

ldapsearch -Y GSSAPI -H "ldap://samba-dc.ad.example.com" -b "dc=ad,dc=example,dc=com" "(objectClass=user)" sAMAccountName

However, when I attempt to use this Python snippet:

import ldap,ldap.sasl
from pprint import pprint

l = ldap.initialize("ldap://samba-dc.ad.example.com", trace_level=100)

rc = l.sasl_gssapi_bind_s()

base = "dc=ad,dc=example,dc=com"
criteria = "(objectClass=user)"
result = l.search_s(base, ldap.SCOPE_SUBTREE, criteria)
pprint(result)

It doesn't work, and I get this error:

ldap.OPERATIONS_ERROR: {'desc': 'Operations error', 'info': '00002020: Operation unavailable without authentication'}

FWIW: I can't get this to work with ldap3 either: cannatag/ldap3#669 That issue is unrelated.

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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy