Remove default user after installation
This commit is contained in:
parent
ace08a4a97
commit
6a56893b47
|
@ -31,6 +31,9 @@ set -x
|
|||
|
||||
PROJECT_NAME='freedombone'
|
||||
|
||||
# username created by default within a debian image
|
||||
GENERIC_IMAGE_USERNAME='fbone'
|
||||
|
||||
export TEXTDOMAIN=${PROJECT_NAME}-image-customise
|
||||
export TEXTDOMAINDIR="/usr/share/locale"
|
||||
|
||||
|
@ -275,15 +278,26 @@ EOF
|
|||
# Remove the initial setup files
|
||||
echo ' rm /root/.initial_setup' >> $rootdir/root/.bashrc
|
||||
echo " rm /home/${MY_USERNAME}/.initial_setup" >> $rootdir/root/.bashrc
|
||||
echo " touch /root/.remove_${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc
|
||||
echo ' shred -zu ~/login.txt' >> $rootdir/root/.bashrc
|
||||
echo ' dialog --title "Congratulations!" --msgbox "\nYour Freedombone system has now installed\n\nPress any key to reboot and begin using it" 9 50' >> $rootdir/root/.bashrc
|
||||
cat >> $rootdir/root/.bashrc <<EOF
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
exit
|
||||
fi
|
||||
EOF
|
||||
|
||||
echo ' reboot' >> $rootdir/root/.bashrc
|
||||
echo ' fi' >> $rootdir/root/.bashrc
|
||||
echo ' fi' >> $rootdir/root/.bashrc
|
||||
echo ' exit' >> $rootdir/root/.bashrc
|
||||
echo 'else' >> $rootdir/root/.bashrc
|
||||
echo ' # Remove default account after install' >> $rootdir/root/.bashrc
|
||||
echo " if [ -f /root/.remove_${GENERIC_IMAGE_USERNAME} ]; then" >> $rootdir/root/.bashrc
|
||||
echo " if [ -d /home/${GENERIC_IMAGE_USERNAME} ]; then" >> $rootdir/root/.bashrc
|
||||
echo " userdel -r ${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc
|
||||
echo " if [ -d /home/${GENERIC_IMAGE_USERNAME} ]; then" >> $rootdir/root/.bashrc
|
||||
echo " rm -rf /home/${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc
|
||||
echo " rm /root/.remove_${GENERIC_IMAGE_USERNAME}" >> $rootdir/root/.bashrc
|
||||
echo ' fi' >> $rootdir/root/.bashrc
|
||||
echo ' fi' >> $rootdir/root/.bashrc
|
||||
echo ' fi' >> $rootdir/root/.bashrc
|
||||
echo 'fi' >> $rootdir/root/.bashrc
|
||||
}
|
||||
|
||||
continue_installation() {
|
||||
|
|
Loading…
Reference in New Issue