This will modify most of the system files to take a template vm and make it more useful. Something where you can change the IP address, create a custom user with a password, add that new user to the sudo group, and set the hostname of the machine all in one relatively small script
This is a posix compliant script, as checked by shellcheck.net. This was created and tested on Ubuntu 20.04 and Ubuntu 22.04 virtual machines, so your mileage might vary