From dc8ad013505466af2107fca2c574f97ad866e4cd Mon Sep 17 00:00:00 2001 From: teldra Date: Mon, 7 Feb 2022 21:25:16 +0100 Subject: [PATCH] progress --- etc/base | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/etc/base b/etc/base index 6ecf708..d1327c2 100644 --- a/etc/base +++ b/etc/base @@ -53,7 +53,7 @@ if [ "$ENCRYPTION_STYLE" == "a" ] || [ "$ENCRYPTION_STYLE" == "d" ]; then fi if [ "$ENC" == "1" ]; then - echo "echo \"Install pw is ${pass}\"" > /etc/runit/core-services/99-changepwdisk.sh + echo "echo \"Disk pw is \'${pass}\'\"" > /etc/runit/core-services/99-changepwdisk.sh echo "read -p \"Change PW for disk? y/n \" answer" >> /etc/runit/core-services/99-changepwdisk.sh echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwdisk.sh echo " while ! cryptsetup luksChangeKey /dev/disk/by-uuid/${cfg[partuuid]}; do" >> /etc/runit/core-services/99-changepwdisk.sh @@ -63,15 +63,16 @@ if [ "$ENC" == "1" ]; then echo "fi" >> /etc/runit/core-services/99-changepwdisk.sh fi -useradd -G wheel -m -s /usr/bin/bash $USERNAME +useradd -G wheel -m -s /usr/bin/bash "${USERNAME}" echo -e "${pass}\n${pass}" | passwd "${USERNAME}" passwd -dl root -echo "echo \"Install pw is ${pass}\"" > /etc/runit/core-services/99-changepwuser.sh -echo "read -p \"Change PW for ${users[name1]}? y/n \" answer" >> /etc/runit/core-services/99-changepwuser.sh +echo "echo \"User pw is \'${pass}\'\"" > /etc/runit/core-services/99-changepwuser.sh +echo "echo \"You should change it before login\"" > /etc/runit/core-services/99-changepwuser.sh +echo "read -p \"Change PW for ${USERNAME}? y/n \" answer" >> /etc/runit/core-services/99-changepwuser.sh echo "if [ \"\${answer}\" = \"y\" ]; then" >> /etc/runit/core-services/99-changepwuser.sh -echo " while ! passwd ${users[name1]}; do" >> /etc/runit/core-services/99-changepwuser.sh +echo " while ! passwd ${USERNAME}; do" >> /etc/runit/core-services/99-changepwuser.sh echo " echo \"Again, please\"" >> /etc/runit/core-services/99-changepwuser.sh echo " done" >> /etc/runit/core-services/99-changepwuser.sh echo " rm -rf /etc/runit/core-services/99-changepwuser.sh" >> /etc/runit/core-services/99-changepwuser.sh