[python-ldap] Error with expiring accounts

Polkosnik, Adam adam.polkosnik at ny.frb.org
Wed Mar 12 23:02:18 CET 2014


Works for me.
Thanks!


-----Original Message-----
From: Michael Ströder [mailto:michael at stroeder.com]
Sent: Wednesday, March 12, 2014 5:16 PM
To: Polkosnik, Adam; python-ldap at python.org
Subject: Re: [python-ldap] Error with expiring accounts

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.




This e-mail message, including attachments, is for the sole use of the intended recipient(s) and may contain confidential or proprietary information.  If you are not the intended recipient, immediately contact the sender by reply e-mail and destroy all copies of the original message.


More information about the python-ldap mailing list