[python-ldap] Error with expiring accounts
michael at stroeder.com
Wed Mar 12 21:20:33 CET 2014
Polkosnik, Adam wrote:
> I really don’t see where you have those values (they are listed in Lib/ldap/controls/pwdpolicy.py):
> 2.16.840.1.1137126.96.36.199 - Netscape Password Expired LDAPv3 control
> 2.16.840.1.1137188.8.131.52 - Netscape Password Expiring LDAPv3 control
Ouch! I've overlooked that you're talking about pwdpolicy and not ppolicy.
May I ask which LDAP server that is?
Actually the (ancient) I-D above specifies that the server returns this
response control with criticality: false.
> Adding the missing imports to pwdpolicy.py makes it almost work:
> self.gracePeriod = struct.unpack('!Q',encodedControlValue)
> struct.error: unpack requires a string argument of length 8
> So, at this point it's complaining that the encodedControlValue is shorter than 8 bytes?!
> Dow we just get rid of the unpack and assign the value? At least that seemed to work ok.
Hmm, it seems I don't have such a LDAP server to test.
Could you please send repr(encodedControlValue) and determine how many seconds
the grace period really is?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
More information about the python-ldap