Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LastPasswordSet date has not the right time in certain case #20

Open
skidrow88 opened this issue Nov 15, 2022 · 5 comments
Open

LastPasswordSet date has not the right time in certain case #20

skidrow88 opened this issue Nov 15, 2022 · 5 comments

Comments

@skidrow88
Copy link

I noticed on certain operating systems, when the output format date is '%m/%d/%Y %H:%M:%S %p', there is a time difference about 2 hours between the lastPasswordSet and the whenCreated field.

However, this information is wrong because the user has never changed his password. Both values should be the same.

Capture d’écran 2022-11-15 à 11 47 04

We check on our Active Directory and the LastPasswordSet value is 6/14/2016 1:25:44 PM.

It could be problematic when we want to detect users have not changed their initial password by comparing lastPasswordSet and whenCreated.

Thanks in advance

@prashant3535
Copy link
Collaborator

Are you in GMT+2 Timezone by any chance ?

@skidrow88
Copy link
Author

Yes, the Active Directory is located in Budapest, now GMT +1:00 but in June it's GMT +02:00

@prashant3535
Copy link
Collaborator

That could be the issue ... the tool doesn't do any Timezone modifications by itself ... still I'll go through the code to see if there is any solution.

@skidrow88
Copy link
Author

It seems you use the Convert.ToDateTime for PasswordLastSet but not for whenCreated attribute.

PasswordLastSet = Convert.ToDateTime(AdComputer.Members["PasswordLastSet"].Value);

Thank you

@skidrow88
Copy link
Author

Hello ! Any news on a possible fix ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants