1
0

Fix : no user password.

This commit is contained in:
Jybz 2020-01-03 14:47:14 +01:00
parent 04ed6b37ee
commit e05e98f7ea
2 changed files with 7 additions and 2 deletions

View File

@ -240,7 +240,12 @@ function preparechroot()
fi fi
if [ -n "${ID_USER}" ]; then #If user ID defined, it will be setted at the end of the chroot of the second_stage_install.sh script if [ -n "${ID_USER}" ]; then #If user ID defined, it will be setted at the end of the chroot of the second_stage_install.sh script
echo -e " /sbin/useradd ${ID_USER}\n /bin/passwd ${ID_USER} << EOF\n${PASSWORD}\n${PASSWORD}\nEOF" >>"${BUILD_PATH}/second_stage_install.sh" echo -e " /sbin/useradd ${ID_USER}\n" >>"${BUILD_PATH}/second_stage_install.sh"
if [ -n "${PASSWORD}" ]; then
echo -e " /bin/passwd ${ID_USER} << EOF\n${PASSWORD}\n${PASSWORD}\nEOF" >>"${BUILD_PATH}/second_stage_install.sh"
else
echo -e " /bin/passwd -d ${ID_USER}\n" >>"${BUILD_PATH}/second_stage_install.sh"
fi
else else
info "No user defined, no user account created." info "No user defined, no user account created."
fi fi

View File

@ -55,7 +55,7 @@ ROOT="/mnt/root"
# Default user # Default user
# If not set, no user will be defined. # If not set, no user will be defined.
# ID_USER="banana" ID_USER="banana"
# PASSWORD="bananaPro" # PASSWORD="bananaPro"
#root password #root password