Recover root password

How can I recover root password :wall:

1) I am running Solaris 10 (X86) through VMware for practicing.

2) I was practicing root password recovery and deleted the password in /etc/shadow file.

3) Neither cant login the to the CLI nor Console

4) Selected the Soalris X86 failsafe in menu.. but not accepting to change the password.

You edited /etc/shadow. That is normal to remove the root password, however, you need to check again the state that you have left this file in.

Boot from cdrom and check again /etc/shadow. Ensure that the root user information is the first line of the file. If you have accidentally inserted a blank line, or any other character, at the beginning of the file, that will cause what you are seeing.

Post back any results.

I think that you do not need delete info in /etc/shadow

you need delete the "x" character in the /etc/passwd

root:x:0:0:root:/root:/bin/bash

the "x" indicate that the user have password, you need delete this "x"

root::0:0:root:/root:/bin/bash

Did you try booting from cd rom and getting login at fail safe mode to change the password?

mount the ISO of the install media, change the boot order so that the CDROM is hit first and then follow the prompts to reset the password DON'T reinstall the OS.