From 99b61121636095b07db89ecdc1ad39a2c8906644 Mon Sep 17 00:00:00 2001 From: Alistair Grant Date: Wed, 19 Oct 2016 20:58:57 +0200 Subject: [PATCH] bug fix -u Fix bug preventing new password being set --- samba.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samba.sh b/samba.sh index b909b41..d49d459 100755 --- a/samba.sh +++ b/samba.sh @@ -92,7 +92,7 @@ timezone() { local timezone="${1:-EST5EDT}" # Return: user added to container user() { local name="${1}" passwd="${2}" id="${3:-""}" useradd "$name" -M ${id:+-u $id} - echo "$passwd" | tee - | smbpasswd -s -a "$name" + printf "$passwd\n$passwd\n" | tee - | smbpasswd -s -a "$name" } ### workgroup: set the workgroup @@ -171,4 +171,4 @@ elif ps -ef | egrep -v grep | grep -q smbd; then else [[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D exec ionice -c 3 smbd -FS