To reset the root password, you will need to boot to alternate media, mount the root filesystem, and clear the encrypted password from /etc/shadow


  1. Drop to the open boot prom
  2. Boot to single user mode from cd-rom or network:
  3. ok} boot cdrom -s
    
  4. Perform the fsck - You need to know the controller, target, drive, and slice of the root filesystem:
  5. # fsck -y /dev/rdsk/c0t0d0s0
    
  6. Mount the root filesystem on /mnt
  7. # mount /dev/dsk/c0t0d0s0 /mnt
    
  8. Set the terminal type to something vi will understand
  9. # TERM=vt100
    # export TERM
    
  10. Remove the ecrypted password string from /mnt/etc/shadow, deleting everything between the first two colons as shown below:
  11. # vi /mnt/etc/shadow
    
    root:GAXgz3AFB8m2M:6445::::::
         ^^^^^^^^^^^^^
    
  12. Save the file, and unmount the root filesystem
  13. # umount /mnt
    
  14. If the root filesystem is mirrored, repeat the procedure for both halves of the mirror - otherwise, reboot and set a new password for the root user