Random initial image password
This commit is contained in:
parent
a4aca5ddbc
commit
2294979689
|
@ -213,7 +213,7 @@ if [ -f ~/.initial_setup ]; then
|
|||
echo ''
|
||||
|
||||
NEW_USER_PASSWORD="$(openssl rand -base64 12 | cut -c1-10)"
|
||||
echo "${USER}:${NEW_USER_PASSWORD}"|chpasswd
|
||||
echo "${NEW_USER_PASSWORD}" > ~/login.txt
|
||||
echo " $NEW_USER_PASSWORD"
|
||||
|
||||
echo ''
|
||||
|
@ -229,8 +229,16 @@ EOF
|
|||
cat >> $rootdir/home/root/.bashrc <<EOF
|
||||
# initial setup of the system
|
||||
if [ -f ~/.initial_setup ]; then
|
||||
EOF
|
||||
echo -n " echo \"${MY_USERNAME}:" >> /home/root/.bashrc
|
||||
echo -n '$(cat /home/' >> /home/root/.bashrc
|
||||
echo "${MY_USERNAME}/login.txt)\"|chpasswd" >> /home/root/.bashrc
|
||||
cat >> $rootdir/home/root/.bashrc <<EOF
|
||||
freedombone menuconfig
|
||||
rm ~/.initial_setup
|
||||
EOF
|
||||
echo " shred -zu /home/${MY_USERNAME}/login.txt" >> $rootdir/home/root/.bashrc
|
||||
cat >> $rootdir/home/root/.bashrc <<EOF
|
||||
fi
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue