rootdir
This commit is contained in:
parent
4ede9b7028
commit
8c7929e4b0
|
@ -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 <<EOF
|
||||
echo ''
|
||||
echo 'Copy it into a password manager or write it down somewhere.'
|
||||
echo ''
|
||||
|
@ -232,9 +234,9 @@ EOF
|
|||
# initial setup of the system
|
||||
if [ -f ~/.initial_setup ]; then
|
||||
EOF
|
||||
echo -n " echo \"${MY_USERNAME}:" >> /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 <<EOF
|
||||
freedombone menuconfig
|
||||
rm ~/.initial_setup
|
||||
|
|
Loading…
Reference in New Issue