This commit is contained in:
Tracker-Friendly 2023-07-30 23:48:38 +01:00
parent 69fbd40baa
commit 081d1066c1
1 changed files with 4 additions and 4 deletions

View File

@ -219,21 +219,21 @@ done
dialog --title "Username" --clear --inputbox "Enter display username." 0 0 2>/tmp/dpusername dialog --title "Username" --clear --inputbox "Enter display username." 0 0 2>/tmp/dpusername
dpusername=$(cat /tmp/dpusername) dpusername=$(cat /tmp/dpusername)
while true; do while true; do
dialog --title "Password" --clear --insecure --passwordbox "Enter user password" 0 0 2>/tmp/userpasswd dialog --title "Password" --clear --insecure --passwordbox "Enter user password" 0 0 2>/tmp/userpasswd 0 0
userpasswd="$(cat /tmp/userpasswd)" userpasswd="$(cat /tmp/userpasswd)"
passwd -R /mnt <<EOF passwd -R /mnt <<EOF
$userpasswd $userpasswd
$userpasswd $userpasswd
EOF EOF
if [[ $? = 1 ]]; then if [[ $? = 1 ]]; then
dialog --title "Illegal characters" --msgbox "You cannot have those characters in a password. Please enter a new one." dialog --title "Illegal characters" --msgbox "You cannot have those characters in a password. Please enter a new one." 0 0
continue continue
else else
break break
fi fi
done done
chroot /mnt chfn -f $dpusername $shusername chroot /mnt chfn -f "$dpusername" $shusername
chroot /mnt usermod -a -G video $shusername chroot /mnt usermod -a -G video $shusername
dialog --title "Done!" --msgbox "Hello, and welcome to my minceraft tutorial" dialog --title "Done!" --msgbox "Hello, and welcome to my minceraft tutorial" 0 0