-
Notifications
You must be signed in to change notification settings - Fork 140
use datetime.timedelta to parse duration #56
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
base: master
Are you sure you want to change the base?
Conversation
- return the number of (calculated) seconds in case the parsing results in an exception - use timedelta's built in string formatter to print the value in a human-readable format **WARNING**: i have not yet tested the code
|
Thank you, I will need more time to test this code. I can probably test it next week! |
|
awesome! have a pleasant weekend 👋 |
|
the formatting code works correctly, as can be seen below: the value for unfortunately, the same (incorrect) max. password age is reported: so either the conversion from the two 32-bit values, |
... or maximum password age is in fact set to the above value and there's something wrong with the ansible script |
The maximum password age is indeed set to the detected value (minus the minutes). Looks like it is just a windows feature.
Looks like the value translate (at least in the GUI) to "does not expire". As the maximum age is limited in the GUI to 999 as written in documentation.
Looks like the value can go above the 37201, but if the maximum value for
I am not sure yet, where this value comes from, but it looks like enum4linux-ng indeed detects the maximum password age correctly |
|
I have not forgotten this pull request. Since it doesn't bring any benefit at the moment, I leave it open for now. I actually like your implementation, I just want to test this a bit more. |




WARNING: i have not yet tested the code
i stumbled upon this bug (?) while trying to understand the results of a scan of one of the GOAD machines (provided by @ikstream):
the maximum password age for this machine is in fact 10675199 days (29247 years).
see GOAD/ansible/roles/password_policy/tasks/main.yaml