[python-ldap] Error with expiring accounts
Michael Ströder
michael at stroeder.com
Wed Mar 12 18:40:55 CET 2014
On Wed, 12 Mar 2014 17:34:40 +0000 "Polkosnik, Adam"
<adam.polkosnik at ny.frb.org> wrote
> To me, it looks like that the classes/OIDs from pwdpolicy.py are not making
> it into KNOWN_RESPONSE_CONTROLS.
Works for me (first case without class PasswordPolicyControl as expected):
Python 2.7.3 (default, Apr 14 2012, 08:58:41) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ldap.controls
>>> ldap.controls.KNOWN_RESPONSE_CONTROLS
{'1.3.6.1.4.1.4203.666.5.12': <class ldap.controls.simple.RelaxRulesControl at
0x7fb74dca6db8>, '1.3.6.1.1.12': <class ldap.controls.libldap.AssertionControl
at 0x7fb74dcaf0b8>, '2.16.840.1.113730.3.4.2': <class
ldap.controls.simple.ManageDSAITControl at 0x7fb74dca6d50>,
'1.2.840.113556.1.4.319': <class
ldap.controls.libldap.SimplePagedResultsControl at 0x7fb74dcaf188>,
'1.2.826.0.1.3344810.2.3': <class ldap.controls.libldap.MatchedValuesControl at
0x7fb74dcaf120>, '2.16.840.1.113730.3.4.15': <class
ldap.controls.simple.AuthorizationIdentityResponseControl at 0x7fb74dca6ef0>}
>>> import ldap.controls.ppolicy
>>> ldap.controls.KNOWN_RESPONSE_CONTROLS
{'1.3.6.1.4.1.4203.666.5.12': <class ldap.controls.simple.RelaxRulesControl at
0x7fb74dca6db8>, '1.3.6.1.1.12': <class ldap.controls.libldap.AssertionControl
at 0x7fb74dcaf0b8>, '2.16.840.1.113730.3.4.2': <class
ldap.controls.simple.ManageDSAITControl at 0x7fb74dca6d50>,
'1.3.6.1.4.1.42.2.27.8.5.1': <class ldap.controls.ppolicy.PasswordPolicyControl
at 0x7fb74d6096d0>, '1.2.840.113556.1.4.319': <class
ldap.controls.libldap.SimplePagedResultsControl at 0x7fb74dcaf188>,
'1.2.826.0.1.3344810.2.3': <class ldap.controls.libldap.MatchedValuesControl at
0x7fb74dcaf120>, '2.16.840.1.113730.3.4.15': <class
ldap.controls.simple.AuthorizationIdentityResponseControl at 0x7fb74dca6ef0>}
Anyway you could even register the class in
ldap.controls.KNOWN_RESPONSE_CONTROLS yourself.
Ciao, Michael.
More information about the python-ldap
mailing list