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

Root account locked #125

Open
stwongst opened this issue Nov 27, 2023 · 0 comments
Open

Root account locked #125

stwongst opened this issue Nov 27, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@stwongst
Copy link

Describe the Issue
Task to ensure root password is set can't handle root account disabled:

Root password is set:

passwd -S root | grep "Password set, SHA512 crypt"

root PS 1969-12-31 0 99999 7 -1 (Password set, SHA512 crypt.)

Root account is locked:
passwd -S root
root LK 1969-12-31 0 99999 7 -1 (Password locked.)

Expected Behavior
Root locked should be passed.

Actual Behavior
Check failed as the expected string "Password set, SHA512 crypt" doesn't exist.

Control(s) Affected
What controls are being affected by the issue

Environment (please complete the following information):

  • branch being used: devel
  • Ansible Version: 2.14.2
  • Host Python Version: Python 3.9.18
  • Ansible Server Python Version: Python 3.9.16
  • Additional Details: Nil

Additional Notes
Nil

Possible Solution

tasks/main.yml:

50c50
< ansible.builtin.shell: passwd -S root | egrep -e "(Password set, SHA512 crypt|Password locked)"

    ansible.builtin.shell: passwd -S root | grep "Password set, SHA512 crypt"
@stwongst stwongst added the bug Something isn't working label Nov 27, 2023
@uk-bolly uk-bolly self-assigned this Feb 19, 2024
uk-bolly added a commit that referenced this issue Feb 19, 2024
Signed-off-by: Mark Bolwell <[email protected]>
@uk-bolly uk-bolly mentioned this issue Feb 20, 2024
uk-bolly added a commit that referenced this issue Feb 20, 2024
* change logic thanks to @rjacobs1990 see #175

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @ipruteani-sie #134

Signed-off-by: Mark Bolwell <[email protected]>

* Thanks to @stwongst #125

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @sgomez86 #146

Signed-off-by: Mark Bolwell <[email protected]>

* Added updates from #115

Signed-off-by: Mark Bolwell <[email protected]>

* removed rp_filter in post added in error

Signed-off-by: Mark Bolwell <[email protected]>

* updated yamllint precommit

Signed-off-by: Mark Bolwell <[email protected]>

* updated fqcn fo json_query

Signed-off-by: Mark Bolwell <[email protected]>

* updated

Signed-off-by: Mark Bolwell <[email protected]>

* fix typo for virt type query

Signed-off-by: Mark Bolwell <[email protected]>

---------

Signed-off-by: Mark Bolwell <[email protected]>
ipruteanu-sie pushed a commit to siemens/RHEL9-CIS that referenced this issue Feb 21, 2024
* change logic thanks to @rjacobs1990 see ansible-lockdown#175

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @ipruteani-sie ansible-lockdown#134

Signed-off-by: Mark Bolwell <[email protected]>

* Thanks to @stwongst ansible-lockdown#125

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @sgomez86 ansible-lockdown#146

Signed-off-by: Mark Bolwell <[email protected]>

* Added updates from ansible-lockdown#115

Signed-off-by: Mark Bolwell <[email protected]>

* removed rp_filter in post added in error

Signed-off-by: Mark Bolwell <[email protected]>

* updated yamllint precommit

Signed-off-by: Mark Bolwell <[email protected]>

* updated fqcn fo json_query

Signed-off-by: Mark Bolwell <[email protected]>

* updated

Signed-off-by: Mark Bolwell <[email protected]>

* fix typo for virt type query

Signed-off-by: Mark Bolwell <[email protected]>

---------

Signed-off-by: Mark Bolwell <[email protected]>
ipruteanu-sie pushed a commit to siemens/RHEL9-CIS that referenced this issue Mar 11, 2024
* change logic thanks to @rjacobs1990 see ansible-lockdown#175

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @ipruteani-sie ansible-lockdown#134

Signed-off-by: Mark Bolwell <[email protected]>

* Thanks to @stwongst ansible-lockdown#125

Signed-off-by: Mark Bolwell <[email protected]>

* thanks to @sgomez86 ansible-lockdown#146

Signed-off-by: Mark Bolwell <[email protected]>

* Added updates from ansible-lockdown#115

Signed-off-by: Mark Bolwell <[email protected]>

* removed rp_filter in post added in error

Signed-off-by: Mark Bolwell <[email protected]>

* updated yamllint precommit

Signed-off-by: Mark Bolwell <[email protected]>

* updated fqcn fo json_query

Signed-off-by: Mark Bolwell <[email protected]>

* updated

Signed-off-by: Mark Bolwell <[email protected]>

* fix typo for virt type query

Signed-off-by: Mark Bolwell <[email protected]>

---------

Signed-off-by: Mark Bolwell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants