If you forget the root password or experience another problem that prevents the system from booting, perform the following tasks:
Stop the system.
Follow the directions in How to Boot From Media to Resolve an Unknown root Password in Booting and Shutting Down Oracle Solaris 11.4 Systems.
If the root password is the problem, remove the root password from the /etc/shadow file.
Reboot the system.
Log in and set the root password.