-
Notifications
You must be signed in to change notification settings - Fork 94
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
Bugfix 5 3 4 against issue #176 #177
Conversation
With an AD account there isn't an entry in the /etc/shadow file. This caused the password length check to treat it as a zero length password. Now local password check is skipped for AD account. Also added an additional check for a locked local account for the sudo user. Signed-off-by: John Foster <robopickle@proton.me>
Signed-off-by: John Foster <robopickle@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on opening your first pull request and thank you for taking the time to help improve Ansible-Lockdown!
Please join in the conversation happening on the Discord Server as well.
findings in issue ansible-lockdown#168. Changed vars on line 233 to use dictionary. Signed-off-by: John Foster <robopickle@proton.me>
hi @RoboPickle This is a great update, thank you for taking the time, could you possibly add the empty line before each named task just for consistency. Many thanks uk-bolly |
Signed-off-by: John Foster <robopickle@proton.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent thank you for your time
Hi,
You are most welcome. I've added the blank lines which actually makes a real difference with the readability.
I missed that the deprecation was already handled by another PR!
Thanks
John
|
Overall Review
tasks/main.yml was altered to handle the user not being found in /etc/shadow.
The grep has been changed.
In the event that the user is not found in /etc/shadow then the response "not found:not found" is given. This is then picked up by the following block to skip the password checking. A debug message is used to alert the user that this is happening.
An additional check is now being made for local accounts to check that the account has not been locked. This is achieved by checking for a single "!" at the beginning of the password hash.
Also updated dictionary in 6.1.11 to convert vars to dictionary to avoid deprecation warning.
Issue Fixes:
Fixes #176: Using an AD account to connect to host incorrectly fails rule 5.3.4
Enhancements:
Fixes #168 DEPRECATION WARNING is generating when play task 6.1.11 | AUDIT | Ensure no ungrouped files or directories exist
How has this been tested?:
Tested against a minimally configured Alma Linux 9 VM.
Addendum:
6.1.11 Deprecation warning during audit. Updated vars to dictionary and deprecation warning avoided.
More details on testing are available if required.