after updating to 3.8 (ubuntu 18.04 update via apt) the ldap resolver (which was working before) brings the error message “TypeError(“a bytes-like object is required, not ‘str’”,)” when starting the resolver test.
[2023-01-23 14:21:14,664][2240][140618607359744][ERROR][privacyidea.lib.token:538] User information can not be retrieved: a bytes-like object is required, not 'str'
[2023-01-23 14:21:14,681][2240][140618607359744][ERROR][privacyidea.lib.token:538] User information can not be retrieved: a bytes-like object is required, not 'str'
[2023-01-23 14:21:14,697][2240][140618607359744][ERROR][privacyidea.lib.token:538] User information can not be retrieved: a bytes-like object is required, not 'str'
and
File "/opt/privacyidea/lib/python3.8/site-packages/ldap3/utils/ntlm.py", line 491, in ntowf_v2
passparts = self._password.split(':')
Packages are:
privacyidea-apache2/stable,now 3.8-1focal all [installed]
privacyidea-nginx/stable 3.8-1focal all
privacyidea-radius/stable,now 3.4.2-1focal all [installed]
My Solution was to change Bind-Type to simple and Bind-DN to user@domain.
This was working for me. But i still don’t know why NTLM-Auth is not working anymore.
Just for Your Information:
The NTLM-Bind requires the use of MD4-hashes which aren’t supported in newer python versions (3.9 on RHEL9 and 3.10 on Ubuntu22.04).