[python-ldap] Error with expiring accounts

Michael Ströder michael at stroeder.com
Wed Mar 12 22:16:26 CET 2014


Michael Ströder wrote:
> Polkosnik, Adam wrote:
>> In class PasswordExpiringControl: 
>>
>>   def decodeControlValue(self,encodedControlValue):
>>     self.gracePeriod = encodedControlValue
>>     print repr(encodedControlValue)
>>     print repr(encodedControlValue[0])
>>     #self.gracePeriod = struct.unpack('!Q',encodedControlValue)[0]
>>
>>
>>
>>>>> l.simple_bind_s( un, password)
>> '349853'
>> '3'
>> (97, [], 1, [<ldap.controls.pwdpolicy.PasswordExpiringControl instance at 0x7f1ae5b1f098>])
>>
>>
>> It looks like 349853 is a tad above 4 days, so it should be the actual number of seconds until password expiration.
> 
> Hmm, a string of digits indicating the seconds...that's not how I read
> draft-vchu-ldap-pwd-policy.

I stand corrected:

https://lists.forgerock.org/pipermail/opendj/2014-March/003730.html

Please check out CVS HEAD and test whether that works for you.

Ciao, Michael.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2398 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20140312/8cb23376/attachment.bin>


More information about the python-ldap mailing list