How to regenerate a SOLARIS root password if it is lost?
The OS compact disk (1 of 2) can be used to boot up and restore the system:
1. Insert the OS disk into the CD-ROM drive;
2. Press Stop + A to enter OK state;
3. In the OK state, type in the boot cdrom -s command to boot from the CD-ROM drive;
4. Type in the # eeprom boot-device command;
5. Use the command # format to check the root directory, for example:
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0t0d0 <ST34321A cyl 8892 alt 2 hd 15 sec 63>
Specify disk (enter its number):
6. Quit the format command by pressing Ctrl + D.
7. Check the root directory # fsck -y /dev/rdsk/cXtYd0s0 (XY is the partition number viewed in the previous step). Press Y regardless of any prompt information.
8. Mount the root directory # mount /dev/dsk/cXtYd0s0 /a
9. # TERM=sun; export TERM.
10. Edit the file /etc/shadow by entering # vi /a/etc/shadow
Change the fist line, root:c3.yAVmYodWsc:6445, for example, to root::6445:::::. Clear the password.
11. Save the change and exit by running the wq! Command.
12. Unmount the directory
# cd /
# umount /a
14. In the login interface, input root as user name and the password is empty. Enter the OS.