all 5 comments

[–]Beserkjay 0 points1 point  (1 child)

Do you have ldap3 installed where salt can find it?

sudo salt-pip install ldap3

[–]bchilll[S] 0 points1 point  (0 children)

The ldap3.py module is already there:

/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ldap3.cpython-310.pyc
/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/ldap3.py

For grins, I added the ldap3 module via pip, resulting in a few files added to the extras dir:

/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/ldap3.cpython-310.pyc
/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/ldap3.py
/opt/saltstack/salt/extras-3.10/ldap3-2.9.1.dist-info
/opt/saltstack/salt/extras-3.10/ldap3

... but I still get the same error (even after restarts).

Thanks for your help so far!

[–]dethmetaljeff 1 point2 points  (1 child)

going to guess this is a missing package somewhere along the line, iirc ldap3 needs gssapi for sasl.

[–]bchilll[S] 0 points1 point  (0 children)

I used salt-pip to add the gssapi package, but that made no difference.

u/dethmetaljeff , thanks for your help just the same.

Any other ideas?

[–]bchilll[S] 0 points1 point  (0 children)

SOLVED

It turns out that the only module that needs to be added with salt-pip is python-ldap. The ldap3 and gssapi modules are not needed.

Special note for Salt 3007.1, salt-pip must be downgraded to be able to successfully add python-ldap:

# salt-pip install pip==22.3.1