You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using os_hardening, the task - name: Remove shell for linux system accounts fails on coreos due to the system accounts extracted earlier from the getent password database in - name: Extract system accounts from local user database not existing in the /etc/passwd file.
In order to make the task pass, I defined os_ignore_users with a list of accounts extracted from the error json code that listed the accounts not found in /etc/passwd.
I then reran the os_hardening role, but when it reached - name: Remove shell for linux system accounts, the task failed because now system_users was undefined.
I presume I could define system_users, and leave it empty, but I suspect it would be better to add a conditional when system_users is defined (and possibly a check that it is non-empty) to the two tasks that use system_users, which are: Remove shell for linux system accounts and Lock passwords from linux system accounts
...
TASK [devsec.hardening.os_hardening : Remove shell for linux system accounts] *********************************************************
fatal: [192.168.1.134]: FAILED! => {"msg": "'system_users' is undefined"}
Expected Behavior
...
For the os_hardening role to complete successfully.
OS / Environment
Provide all relevant information below, e.g. target OS versions, network device firmware, etc.
coreos on raspberry pi running fedora 41
Description
When using os_hardening, the task
- name: Remove shell for linux system accounts
fails on coreos due to the system accounts extracted earlier from the getent password database in- name: Extract system accounts from local user database
not existing in the /etc/passwd file.In order to make the task pass, I defined
os_ignore_users
with a list of accounts extracted from the error json code that listed the accounts not found in /etc/passwd.I then reran the os_hardening role, but when it reached
- name: Remove shell for linux system accounts
, the task failed because nowsystem_users
was undefined.I presume I could define system_users, and leave it empty, but I suspect it would be better to add a conditional
when system_users is defined
(and possibly a check that it is non-empty) to the two tasks that use system_users, which are:Remove shell for linux system accounts
andLock passwords from linux system accounts
Reproduction steps
Current Behavior
...
TASK [devsec.hardening.os_hardening : Remove shell for linux system accounts] *********************************************************
fatal: [192.168.1.134]: FAILED! => {"msg": "'system_users' is undefined"}
Expected Behavior
...
For the os_hardening role to complete successfully.
OS / Environment
Provide all relevant information below, e.g. target OS versions, network device firmware, etc.
coreos on raspberry pi running fedora 41
Ansible Version
Collection Version
Paste version of the collection. This will be automatically formatted into code, so no need for backticks. 10.3.0
Additional information
...
The text was updated successfully, but these errors were encountered: