Skip to content

Commit 4837464

Browse files
committed
Set user shell even if user is system
linux/system/user.sls ignores 'shell' option if a user is system. This is quite strange behavior, and it breaks CIS: * 5.4.2 Ensure system accounts are non-login Change-Id: I32dd44ac4fcc1425ea47eb4cf60acf41f6ce0887 Related-Prod: PROD-20764
1 parent 0f084a0 commit 4837464

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

linux/system/user.sls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ system_user_{{ name }}:
4343
{%- endif %}
4444
{%- if user.system is defined and user.system %}
4545
- system: True
46+
- shell: {{ user.get('shell', '/bin/false') }}
4647
{%- else %}
4748
- shell: {{ user.get('shell', '/bin/bash') }}
4849
{%- endif %}

0 commit comments

Comments
 (0)