Problem: you are running sun solaris 10 operating system and have forgotten your root password. Assume you have a sun os running in vmware and stuck
Solution:
Boot the Sun Solaris in “SOLARIS FAILSAFE” Mode. By default it enters as single user mode.
This will look for the currently installed Solaris OS on your system and prompts a Yes/No question to mount the Root filesystem as a Read/Write file system onto /a.
Select yes to mount the root file system (/dev/dsk/c0t0d0s0 here) on/a. If you select No, no harm as you still can mount it manually using:
mount /dev/dsk/c0t0d0s0 /a
NOTE: /a is a temporary mount point that is available when you boot from CD or a JumpStart server
Now, with the root file system mounted on /a. All you need to do is to edit the shadow file and remove the encrypted password for root.
# vi /a/etc/shadow
root:
😡
# vi /etc/passwd
root:
😡
# reboot
Now Login using root without password and change the password as below
# passwd root
Now test by Rebooting again and logging in with the new password
Shalom
Hendry