samba.sh fix setting the user passwd

This commit is contained in:
David Personette 2016-10-19 15:33:00 -04:00
parent a77658f2f3
commit 9c455b55fa

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" echo -e "$passwd\n$passwd" | smbpasswd -s -a "$name"
} }
### workgroup: set the workgroup ### workgroup: set the workgroup