diff --git a/pillar.example b/pillar.example index b970e46..14cdc9e 100644 --- a/pillar.example +++ b/pillar.example @@ -8,6 +8,9 @@ users: fullname: B User password: $6$w............. enforce_password: True + # WARNING: If 'empty_password' is set to True, the 'password' statement + # will be ignored by enabling password-less login for the user. + empty_password: False home: /custom/buser createhome: True roomnumber: "A-1" diff --git a/users/init.sls b/users/init.sls index da04f01..e2af37f 100644 --- a/users/init.sls +++ b/users/init.sls @@ -81,6 +81,9 @@ users_{{ name }}_user: {% if 'password' in user -%} - password: '{{ user['password'] }}' {% endif -%} + {% if user.get('empty_password') -%} + - empty_password: {{ user.get('empty_password') }} + {% endif -%} {% if 'enforce_password' in user -%} - enforce_password: {{ user['enforce_password'] }} {% endif -%}