fix password creation

This commit is contained in:
Bob Mottram 2018-03-03 17:46:24 +00:00
parent 33d3301399
commit 6a48ff3ad2
1 changed files with 2 additions and 2 deletions

View File

@ -376,7 +376,7 @@ EOF
# change the password for the admin user
echo -n " echo \"${MY_USERNAME}:";
echo "\$(printf \"%s\" \"\$(cat ~/login.txt)\")|chpasswd";
echo "\$(printf \"%s\" \"\$(cat ~/login.txt)\")\"|chpasswd";
# update before continuing
echo " cd /root/${PROJECT_NAME}";
@ -2002,7 +2002,7 @@ chroot "$rootdir" /usr/bin/env -i \
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
echo "export PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:" >> "$rootdir/root/.bashrc"
chroot "$rootdir" adduser --gecos "$username" --disabled-password "$username"
echo "$username":"$password" | chroot "$rootdir" /usr/sbin/chpasswd
echo "$username:$password" | chroot "$rootdir" /usr/sbin/chpasswd
chroot "$rootdir" adduser "$username" sudo
if [ ! "$DEBIAN_REPO" ]; then