Commits

edogawaconan committed 9562390

Fixed password setup in smbpasswd.

Comments (0)

Files changed (1)

script/genstream-update-password

 passfile="$(dirname "${0}")/../data/genstream.txt"
 new_password=$(awk 'BEGIN{srand(); printf "%08d\n",(rand()*100000000)}')
 mkdir -p "$(dirname "${passfile}")"
-awk 'BEGIN{srand(); printf "%08d\n",(rand()*100000000)}' | tee "${passfile}" | smbpasswd -s "${1}"
+echo "${new_password}" > "${passfile}"
+printf '%s\n%s\n' "${new_password}" "${new_password}" | smbpasswd -s "${1}"