🐞 fix:using encrypted password to setting os user's password.

This commit is contained in:
linxin
2024-07-04 11:53:31 +08:00
parent 9377abbb8b
commit 8314d1bde1
2 changed files with 4 additions and 10 deletions

View File

@@ -8,22 +8,16 @@ mount --bind /data/home/ /home/
# Create default user: user,admin,support # Create default user: user,admin,support
echo "Setting user user password as user" echo "Setting user user password as user"
useradd -G systemd-journal -s /bin/bash -m user useradd -G systemd-journal -s /bin/bash -m -p"\$1\$B.GUzaBW\$jt9Nea3tta9zAxiB2lLdS/" user
echo GDNT2023J8e+76 | passwd user --stdin
#echo "user ALL=(ALL) ALL" >> /etc/sudoers #echo "user ALL=(ALL) ALL" >> /etc/sudoers
echo GDNT2023J8e+76 | passwd --stdin
echo "Setting user admin password as admin" echo "Setting user admin password as admin"
useradd -G systemd-journal -s /bin/bash -m admin useradd -G systemd-journal -s /bin/bash -m -p"\$1\$bn33nXye\$UcX0RqOF1cQrMiLZPRkcd/" admin
echo GDNT202342U9.x | passwd admin --stdin
echo "%admin ALL=(ALL) ALL" >> /etc/sudoers echo "%admin ALL=(ALL) ALL" >> /etc/sudoers
echo GDNT202342U9.x | passwd --stdin
echo "Setting user support password as support" echo "Setting user support password as support"
useradd -G systemd-journal -s /bin/bash -m support useradd -G systemd-journal -s /bin/bash -m -p"\$1\$yN9/QmOg\$jluyG1/JyKzIQrB69FDxs1" support
echo GDNT2023QV3:vI | passwd support --stdin
echo "%support ALL=(ALL) ALL" >> /etc/sudoers echo "%support ALL=(ALL) ALL" >> /etc/sudoers
echo GDNT2023QV3:vI | passwd --stdin
# umount /home/ # umount /home/

View File

@@ -317,7 +317,7 @@ mount -t ext4 ${blk_dev}${exp_part_tsg_os_data} ${distro_mnt}/data
echo "Setting up TSG-OS sysroot .." echo "Setting up TSG-OS sysroot .."
chroot ${distro_mnt} /distro-setup.sh ${blk_dev} chroot ${distro_mnt} /distro-setup.sh ${blk_dev}
rm -f ${distro_mnt}/distro-setup.sh
read_device_type read_device_type
install_patches install_patches
append_kernel_args append_kernel_args