bug fix -u
Fix bug preventing new password being set
This commit is contained in:
parent
a77658f2f3
commit
99b6112163
4
samba.sh
4
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"
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user