Created
August 19, 2016 14:10
-
-
Save eqhmcow/886717fc3b584118c954e9be5544dc28 to your computer and use it in GitHub Desktop.
quick and dirty linux "sysprep"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove IP / set IP to one that won't be used for other systems | |
# clear ssh host key | |
rm -rf /etc/ssh/ssh_host_* | |
# remove /etc/hosts entries as applicable | |
# remove utmp data - wtmp and btmp and lastlog | |
rm /var/log/{w,b}tmp /var/log/lastlog ; | |
touch /var/log/{w,b}tmp /var/log/lastlog ; | |
chown root.utmp /var/log/{w,b}tmp /var/log/lastlog ; | |
chmod 660 /var/log/btmp ; | |
chmod 664 /var/log/wtmp /var/log/lastlog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment