samba.sh fix setting the user passwd
This commit is contained in:
parent
a77658f2f3
commit
9c455b55fa
2
samba.sh
2
samba.sh
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user