From 723b9413b0ac075ab820512b7239ddfa69ae1066 Mon Sep 17 00:00:00 2001 From: SvenEeckeman Date: Thu, 1 Dec 2016 21:24:21 +0100 Subject: [PATCH] Update main.yml Fixed a problem that occurs when adding users with usernames that are part of already existing usernames (e.g. when alexander exists, you won't be able to add user alex). --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index 56aff6c..0f96514 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -93,7 +93,7 @@ - name: Create Samba users if they don't exist yet shell: > - (pdbedit -L | grep {{ item.name }} 2>&1 > /dev/null) \ + (pdbedit --user={{ item.name }} 2>&1 > /dev/null) \ || (echo {{ item.password }}; echo {{ item.password }}) \ | smbpasswd -s -a {{ item.name }} with_items: "{{ samba_users }}"