From 944e9044193c104aa265d86d924e9b55da41d370 Mon Sep 17 00:00:00 2001 From: Philippe Pepiot Date: Tue, 17 Jul 2018 18:03:04 +0200 Subject: [PATCH] Fix default behavior of copying /etc/skel when creating home directory Since https://github.com/saltstack-formulas/users-formula/pull/182 the home directory was created by salt which prevent "adduser" behavior to copy /etc/skel in newly created directory. Ensure the parent directory of the home dir is existing instead. --- users/init.sls | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/init.sls b/users/init.sls index 4b790a8..62c94df 100644 --- a/users/init.sls +++ b/users/init.sls @@ -64,7 +64,7 @@ users_{{ name }}_{{ group }}_group: {% if user.get('createhome', True) %} users_{{ name }}_user_prereq: file.directory: - - name: {{ home }} + - name: {{ salt['file.dirname'](home) }} - makedirs: True - prereq: - user: users_{{ name }}_user