zakird / pyad

Python Active Directory Tools | *Not actively maintained*
http://zakird.github.io/pyad/
176 stars 72 forks source link

Error Retrieving Attributes #84

Open pnsujith opened 6 years ago

pnsujith commented 6 years ago

Hello,

When I try to retrieve fields like PasswordLastSet, PasswordExpired. it throws an exception. (-2147352567, 'Exception occurred.', (0, 'Provider', 'Unspecified error', None, 1240640, -2147467259), None)

But, I can retrieve those in powershell.

Please help.

Thanks, Sujith.

pnsujith commented 6 years ago

@zakird Any help would be appreciated. Thanks.

stevenpitts commented 5 years ago

@pnsujith Can you try with the newest commit (pull from this repo) and see if it still happens? Also, can you show me the part of your code that retrieves those attributes?

funkwhatyouheard commented 4 years ago

This issue still exists. PasswordLastSet can be replaced with PwdLastSet, but PasswordExpired cannot be retrieved as far as I can tell and neither can PasswordNeverExpires.

funkwhatyouheard commented 4 years ago

Update: they cannot currently be retrieved directly with get_attribute(), but they do exist in the dict() returned by ADUser.get_user_account_control_settings().