From 8c7929e4b0c5357a42a9741fd6dddf4382b78e7c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Mon, 23 Nov 2015 17:08:31 +0000 Subject: [PATCH] rootdir --- src/freedombone-image-customise | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index c6ed7b19..d6b4d907 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -213,11 +213,13 @@ if [ -f ~/.initial_setup ]; then echo 'This is your new password. Use whenever you wish to ssh into' echo 'this system.' echo '' +EOF - NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)" - echo "${NEW_USER_PASSWORD}" > ~/login.txt - echo " $NEW_USER_PASSWORD" +echo ' NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"' >> $rootdir/root/.bashrc +echo ' echo "${NEW_USER_PASSWORD}" > ~/login.txt' >> $rootdir/root/.bashrc +echo ' echo " $NEW_USER_PASSWORD"' >> $rootdir/root/.bashrc + cat >> $rootdir/home/$MY_USERNAME/.bashrc <> /root/.bashrc - echo -n '$(cat /home/' >> /root/.bashrc - echo "${MY_USERNAME}/login.txt)\"|chpasswd" >> /root/.bashrc + echo -n " echo \"${MY_USERNAME}:" >> $rootdir/root/.bashrc + echo -n '$(cat /home/' >> $rootdir/root/.bashrc + echo "${MY_USERNAME}/login.txt)\"|chpasswd" >> $rootdir/root/.bashrc cat >> $rootdir/root/.bashrc <