Skip to content

Instantly share code, notes, and snippets.

@0xSheepdog
Last active October 26, 2023 17:09
Show Gist options
  • Save 0xSheepdog/7c34a0d21e75f91319d8e493031af0c8 to your computer and use it in GitHub Desktop.
Save 0xSheepdog/7c34a0d21e75f91319d8e493031af0c8 to your computer and use it in GitHub Desktop.
How to change root passwd/gain access to an official .qcow2 image from Red Hat et al.
source info: https://access.redhat.com/solutions/641193#comment-1104651
virt-customize -a rhel-guest-image-7.2-20160302.0.x86_64.qcow2 --root-password password:PASSW0RD --uninstall cloud-init
@0xSheepdog
Copy link
Author

You can also run a script to do things that virt-customize does not perform internally. For example, replace the "--root-password" and "--uninstall" parameters with "-- run MyScriptName.sh" and put commands in the scripts. RTFM for specifics.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment