summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-08-12 04:34:20 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2022-08-16 08:12:58 -0400
commitd3769bc929256ca719ee7849f66ff4d9ef3ebad7 (patch)
tree48eadffcec4dc006a2fdc77ced7aff33860ee317
parentd286c0110203c812c19bd44bd8ad0a420dadbe6d (diff)
store config passwords hashed
-rw-r--r--chroot-environment.sh3
-rw-r--r--chroot-login.sh5
-rwxr-xr-xinstall.sh8
3 files changed, 8 insertions, 8 deletions
diff --git a/chroot-environment.sh b/chroot-environment.sh
index 45a1de1..84533c7 100644
--- a/chroot-environment.sh
+++ b/chroot-environment.sh
@@ -63,7 +63,4 @@ then device=$(GetStateVar 'DEVICE')
sed -i "$GRUB_THEME_SED_CMD" /mnt/etc/default/grub
fi
-# configure root login
-usermod -p $(openssl passwd $(GetStateVar 'ROOT_PASS')) root
-
exit
diff --git a/chroot-login.sh b/chroot-login.sh
index f925047..13a959b 100644
--- a/chroot-login.sh
+++ b/chroot-login.sh
@@ -44,13 +44,16 @@ GsettingsSet() # (kvp)
## main entry ##
+# configure root login
+usermod -p $(GetStateVar 'ROOT_PASS') root
+
# check for the signal to bypass user creation
[[ "$(GetStateVar 'USER_LOGIN')" != 'NONE' ]] &&
[[ "$(GetStateVar 'USER_PASS' )" != 'NONE' ]] || exit 0
# register unprivileged user
Login=$(GetStateVar 'USER_LOGIN')
-Pass=$(openssl passwd "$(GetStateVar 'USER_PASS')")
+Pass=$(GetStateVar 'USER_PASS')
useradd -m -g users -G 'wheel' -s /bin/bash -p ${Pass} ${Login}
# set keymap
diff --git a/install.sh b/install.sh
index 9cf0d72..0019a25 100755
--- a/install.sh
+++ b/install.sh
@@ -172,7 +172,7 @@ SelectLogins()
# prompt for root user password
local pass
_SetPass "${TR[dlg_root-${Lang}]}" "${TR[root_pass-${Lang}]}" "${TR[root_pass2-${Lang}]}"
- SetStateVar 'ROOT_PASS' ${pass}
+ SetStateVar 'ROOT_PASS' $(openssl passwd ${pass})
# MOCK_SELECTLOGINS_USER ; return 0 ;
@@ -196,7 +196,7 @@ SelectLogins()
# prompt for unprivileged user password
_SetPass "${dlg_title}" "${TR[user_pass-${Lang}]}" "${TR[user_pass2-${Lang}]}"
SetStateVar 'USER_LOGIN' ${login}
- SetStateVar 'USER_PASS' ${pass}
+ SetStateVar 'USER_PASS' $(openssl passwd ${pass})
}
SelectBase()
@@ -600,8 +600,8 @@ ConfigChroot()
[[ -n "$(GetStateVar 'LANG' )" ]]
[[ -n "$(GetStateVar 'BOOT' )" ]]
[[ -n "$(GetStateVar 'DEVICE' )" ]]
- [[ -n "$(GetStateVar 'ROOT_PASS' )" ]]
- [[ -n "$(GetStateVar 'USER_LOGIN')" ]] # chroot-login.sh dependencies
+ [[ -n "$(GetStateVar 'ROOT_PASS' )" ]] # chroot-login.sh dependencies
+ [[ -n "$(GetStateVar 'USER_LOGIN')" ]]
[[ -n "$(GetStateVar 'USER_PASS' )" ]]
[[ -n "$(GetStateVar 'XKBMAP' )" ]]
[[ -n "$(GetStateVar 'WMDE' )" ]]