Create template from a vm: Difference between revisions
No edit summary |
No edit summary |
||
| Line 7: | Line 7: | ||
sudo su - root | sudo su - root | ||
rm ~/.Xauthority | rm ~/.Xauthority | ||
echo "" > ~/.bash_history | |||
rm /etc/ssh/ssh_host_* | rm /etc/ssh/ssh_host_* | ||
echo "" > /etc/machine-id | echo "" > /etc/machine-id | ||
systemctl disable --now salt-minion.service | systemctl disable --now salt-minion.service | ||
echo | echo | ||
Revision as of 10:08, 29 August 2024
1. Execute as root:
sudo su - root
rm ~/.Xauthority
echo "" > ~/.bash_history
rm /etc/ssh/ssh_host_*
echo "" > /etc/machine-id
systemctl disable --now salt-minion.service
echo
rm -rf /etc/salt/pki/minion/*
echo "" > /etc/salt/minion_id
echo "" > /etc/resolv.conf
history -c
exit
1. Execute as other user (optional):
rm ~/.Xauthority
echo "" > ~/.bash_history
history -c
sudo shutdown