bug fix -u

Fix bug preventing new password being set
This commit is contained in:
Alistair Grant 2016-10-19 20:58:57 +02:00
parent a77658f2f3
commit 99b6112163

View File

@ -92,7 +92,7 @@ timezone() { local timezone="${1:-EST5EDT}"
# Return: user added to container # Return: user added to container
user() { local name="${1}" passwd="${2}" id="${3:-""}" user() { local name="${1}" passwd="${2}" id="${3:-""}"
useradd "$name" -M ${id:+-u $id} 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 ### workgroup: set the workgroup
@ -171,4 +171,4 @@ elif ps -ef | egrep -v grep | grep -q smbd; then
else else
[[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D [[ ${NMBD:-""} ]] && ionice -c 3 nmbd -D
exec ionice -c 3 smbd -FS </dev/null exec ionice -c 3 smbd -FS </dev/null
fi fi