Skip to content

Commit

Permalink
Hard setting the password policy settings by running a filter on the …
Browse files Browse the repository at this point in the history
…dataframe, we are doing this as an error was caught in an install:

2024-02-07 01:13:27,465 ERROR database_class.pyadd_new_rows: 136 Key error adding new rows to em_7_password_policy: ['ResetLockoutCount', 'LockoutDuration', 'AllowAdministratorLockout'] not in index. Check your column names and comparison_columns

One of the windows versions must have these policy settings but i cannot re-create in my lab so I am just filtering these out so We can get back data
  • Loading branch information
Dale Brennan committed Feb 8, 2024
1 parent 0a2eeb9 commit 6e31dcc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions EM_7_password_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def parse_inf_file(file_path):

try:
df = pd.DataFrame([parsed_data['System Access']])
df = df.filter(['MaximumPasswordAge', 'MinimumPasswordLength', 'PasswordComplexity', 'PasswordHistorySize', 'LockoutBadCount', 'RequireLogonToChangePassword', 'ForceLogoffWhenHourExpire', 'NewAdministratorName', 'NewGuestName', 'ClearTextPassword', 'LSAAnonymousNameLookup', 'EnableAdminAccount', 'EnableGuestAccount'])
except Exception as e:
logger.error(f'Could not load dataframe from sec policy ini file: {e}')
sys.exit(1)
Expand Down

0 comments on commit 6e31dcc

Please sign in to comment.