Load the Solaris cdrom (This does not have to be the same Solaris version as the machine.)
Take the machine down to the PROM level - # init 0 (or halt)
When it comes down to the OK prompt - OK boot cdrom -s
When it is back up - # mount /dev/dsk/c0t0d0s0 /a (your root device/partition) # fsck /dev/dsk/c0t0d0s0 (optional, if you can't mount disk) # cd /a/etc # TERM=vt100;export TERM # vi shadow and remove second field on root line
The root line should like - root::12345:::::: (it must start root:: the other values are not important)
wq! (or x!) init 6 (or reboot)
When the machine comes back up - passwd (set a new root password)