Fix : no user password.
This commit is contained in:
parent
04ed6b37ee
commit
e05e98f7ea
@ -240,7 +240,12 @@ function preparechroot()
|
||||
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
|
||||
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
|
||||
info "No user defined, no user account created."
|
||||
fi
|
||||
|
@ -55,7 +55,7 @@ ROOT="/mnt/root"
|
||||
|
||||
# Default user
|
||||
# If not set, no user will be defined.
|
||||
# ID_USER="banana"
|
||||
ID_USER="banana"
|
||||
# PASSWORD="bananaPro"
|
||||
|
||||
#root password
|
||||
|
Reference in New Issue
Block a user