The fix is somewhat awkward but not very hard. Commands are bold and include the prompt for reference. From memory;
Put your Solaris 2.6 CD in and boot off the cd:
ok boot cdrom
You can get the ok prompt by pressing stop & a simultaneously
Go through the installer and answer all the questions (don't worry, we aren't installing/deleting anything). When you get near the end it will give you the option to EXIT (maybe CANCEL). Do this. Don't worry too much about answering any of the questions properly, just don't click FINISH. The last question asks if you want to auto-reboot or manual-reboot after installation. If you get this far go back. This will drop you on a root shell in the upper right corner. The mouse pointer must be in this window for you to type.
Depending on how your disk is partitioned you may need to mount /etc. Do this only if you cannot open /etc/passwd
# mount /etc
You may need to replace /etc with the device
Edit the password file and make sure the path is correct
# vi /etc/passwd
Bounce the system
I hope this helps.