Steps in editing the /etc/shadow file to fix the root password

1.  Insert the Solaris 2.x media in the CD-ROM drive.

2.  Once the media is in the CD-ROM drive, press the stop -a command (Press the stop button
     and the letter "a" at the same time.

3.   At the OK prompt, type boot cdrom -s  ( the letter s stands for single mode).

4.   After the OS cycle thru the devices, it will come to the # sign.  Type the following command:
 
             # mount   /dev/dsk/c0t3d0s0  /a                    The  /dev/dsk/c0t3d0s0  assume is the cdrom address

5.   From the root prompt type in this command:

             # TERM=sun; export TERM

6.   Next edit the /etc/shadow file:

            # vi    /a/etc/shadow

7.  I believe the first line of the file is the one you need to modify.  It should look like this:

            root:hfN8E.8mRm7gE:10912::::::
            daemon:NP:6445::::::
            bin:NP:6445::::::
            sys:NP:6445::::::
            adm:NP:6445::::::
            lp:NP:6445::::::
            uucp:NP:6445::::::
            nuucp:NP:6445::::::
            listen:*LK*:::::::
            nobody:NP:6445::::::
            noaccess:NP:6445::::::
            nobody4:NP:6445::::::

8.   You want to delete every character between the first and second colons.  When you are finish it
       should look like this:

           root::6445: : : : : :

9.   After you make the changes do:
 
           :wq!

10.  The next step is to unmount the file system.

          # cd /
          # umount /a

11.  Finally reboot the system by issuing the command:

         init 6

12.   When the OS comes back it prompt you for a new password.