Skip to content

Instantly share code, notes, and snippets.

@0xSheepdog
Last active November 25, 2023 20:56
Show Gist options
  • Save 0xSheepdog/07284a9b1a1a3e2d30cc63a40a89cb77 to your computer and use it in GitHub Desktop.
Save 0xSheepdog/07284a9b1a1a3e2d30cc63a40a89cb77 to your computer and use it in GitHub Desktop.
this shell script is intended for use with the `virt-customize` command via the `--run` parameter. it sets certain configurations on a libvirt guest disk image
# add myuser and grant sudo privileges
useradd -m myuser
echo password | passwd myuser --stdin
echo "myuser ALL=(ALL) ALL" | tee -a /etc/sudoers.d/00-myuser
# enable serial console
systemctl enable --now serial-getty@ttyS0.service
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment