* Replace the hashed password field for the root user with nothing. After editing the line for <code>root</code> should look like this:<code>root:::::::</code>
* Reboot into CentOS and try to log in.
{{Admon/important|SELinux|Depending on how you edited your file: at this point you may not be able to log in as any user with any password. The root password has been removed but SELinux is "securing" your system and will not allow the login process to read the shadow file, therefore you can't log in. We'll need to fix this.}}
* Reboot your VM and at the boot prompt press <code>e</code> (for Edit).
* Scroll down to the line that starts with <code>linux16</code>. These are the parameters passed to the kernel when it's started.
* At the end of that line add <code>enforcing=0</code>
* Press <code>Ctrl-x</code> to boot the system.
* Now you should be able to log in, and you'll get a message about some SELinux problems.
* One of those messages will suggest that you run <code>restorecon -v /etc/shadow</code>. Do that as root (notice you don't need to type in a root password any more).
* Now you can disconnect your DVD drive, reboot, and log in normally.
SELinux added steps to the process, but it's nothing more than a distraction. At the end of the day - you should have figured out that as long as you control the disk image, you have full control over its contents.
=== The same using CentOS ISO ===