-
Notifications
You must be signed in to change notification settings - Fork 309
Description
🐛 Bug Report
Title: AttributeError: module 'ldap3' has no attribute 'TLS_CHANNEL_BINDING' after installing to PacketFence 14.1 on Debian 12
Description
After upgrading to PacketFence 14.1 (package packetfence_14.1.0+20251008182116+2097477396+0012+maintenance~14~1+bookworm1 from the official Debian repository), running the impacket_addcomputer.py script fails with the following error:
Impacket v0.10.0 - Copyright 2022 SecureAuth Corporation
Traceback (most recent call last):
File "/usr/local/pf/bin/impacket/impacket_addcomputer.py", line 611, in <module>
group.add_argument('-channel-binding', action='store_const', const = ldap3.TLS_CHANNEL_BINDING, help='enable TLS Channel Binding')
^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'ldap3' has no attribute 'TLS_CHANNEL_BINDING'
It seems that the installed ldap3 library version (2.9.1) does not define the TLS_CHANNEL_BINDING constant that the script expects.
Steps to Reproduce
- Install PacketFence 14.1 from the official Debian repositories on Debian 12 (bookworm)
(package:packetfence_14.1.0+20251008182116+2097477396+0012+maintenance~14~1+bookworm1) - Run the following command:
/usr/local/pf/bin/impacket/impacket_addcomputer.py
- Observe the
AttributeError: module 'ldap3' has no attribute 'TLS_CHANNEL_BINDING'error message.
Expected Behavior
The script should:
- Check for the presence of
ldap3.TLS_CHANNEL_BINDINGbefore using it, or - Be compatible with the current versions of
ldap3(≥2.9.1) that no longer expose this constant.
System Information
| Component | Version |
|---|---|
| OS | Debian 12 (bookworm) |
| PacketFence package | packetfence_14.1.0+20251008182116+2097477396+0012+maintenance~14~1+bookworm1 |
| Impacket | 0.10.0 |
| ldap3 | 2.9.1 |
| Installation method | Official PacketFence Debian repository |
| Script path | /usr/local/pf/bin/impacket/impacket_addcomputer.py |
Analysis / Possible Fix
- In recent versions of
ldap3, the TLS Channel Binding support has changed, and the constantTLS_CHANNEL_BINDINGis no longer directly exposed. - The code could be adjusted to handle this gracefully, for example:
if hasattr(ldap3, "TLS_CHANNEL_BINDING"):
const = ldap3.TLS_CHANNEL_BINDING
else:
const = None- Alternatively, the dependency on
ldap3could be pinned to a version that still providesTLS_CHANNEL_BINDING, or the impacket integration updated accordingly.
Impact
This issue prevents certain Active Directory integrations (via Impacket) from functioning properly, especially scripts like impacket_addcomputer.py used for automated computer account creation.
Additional Notes
It may be useful to review compatibility between PacketFence’s bundled Impacket and the currently shipped ldap3 version.