Skip to content
Snippets Groups Projects
Commit af1f72a7 authored by Bob Mottram's avatar Bob Mottram
Browse files

Show generated password using dialog

parent 49593d84
No related branches found
No related tags found
No related merge requests found
......@@ -220,19 +220,6 @@ EOF
cat >> $rootdir/root/.bashrc <<EOF
# initial setup of the system
if [ -f ~/.initial_setup ]; then
clear
echo "
.---. . .
| | |
|--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
| | (.-' (.-' ( | ( )| | | | )( )| | (.-'
' ' --' --' -' - -' ' ' -' -' -' ' - --'
Initial setup process
"
echo 'This is your new password. Use it whenever you wish to ssh into'
echo 'this system.'
echo ''
EOF
echo ' if [ -f ~/login.txt ]; then' >> $rootdir/root/.bashrc
echo ' NEW_USER_PASSWORD=$(cat ~/login.txt)' >> $rootdir/root/.bashrc
......@@ -245,14 +232,9 @@ EOF
echo ' NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc
echo ' fi' >> $rootdir/root/.bashrc
echo ' echo -n "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc
echo ' echo " $NEW_USER_PASSWORD"' >> $rootdir/root/.bashrc
echo ' dialog --backtitle "Freedombone initial setup process" --title "New Password" --msgbox "This is your new password. Use it whenever you wish to ssh into this system.\n\n $NEW_USER_PASSWORD\n\nPlease take a moment to copy the above password into a password manager or write it down somewhere." 12 50' >> $rootdir/root/.bashrc
cat >> $rootdir/root/.bashrc <<EOF
echo ''
echo 'Copy it into a password manager or write it down somewhere.'
echo ''
read -n1 -r -p "Press any key to continue..." key
freedombone menuconfig
if [ "$?" = "0" ]; then
EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment