How to reset root password in Solaris 11.2
How to reset root password in Solaris 11.2
Step 1: Boot from the Oracle Solaris media.

Step 2: Import the root pool.
Import the root pool, Mostly the pool name for root file system is rpool.
zpool import -f rpool |
Step 3: Mount the boot environment.
a. Create a mount point for the boot environment.
mkdir /a |
b. Check for the boot environments available.
beadm list |

c. Mount the boot environment(in our case solaris-1) on the mount point /a.
beadm mount solaris-1 /a |
Step 3: Remove the root password from the /etc/shadow file.
a. Edit the shadow file and clear all text between the first colon (😃 and second colon(😃. This text is the encrypted password for root.
vi /a/etc/shadow |

b. By default, Solaris doesn’t allow empty password, for this the workaround is to Change the ‘PASSREQ’ option to ‘no’ in file (etc/default/login)
grep '^PASSREQ' /etc/default/login |

Step 4: Update the boot archive.
bootadm update-archive -R /a |
Step 5: Unmount the boot environment.
beadm umount solaris-1 |
Step 6: Reboot the system to single user mode.
After reboot, on grub meue press e to modify, and append -s in line $kern.

Press Ctrl-x to boot.
Step 7: Reset the root password.
passwd -r files root |
After changing the root password, change back the ‘PASSREQ’ option to ‘YES’ in file (etc/default/login).
sed -n '/^PASSREQ/s/NO/YES/p' /etc/default/login |