Solaris use ufs and knoppix recognize it (ufstype=sunx86)
This works only if you are running Solaris x86.
With Sparc H/W, the easiest way is to boot on the solaris installation 1 disk, then, when under X11, open a terminal window, mount your slice on /mnt, fix the /etc/passwd file and reboot.
Even with x86, ufs R/W support is said to be experimental, so trying to change your passwd file can be risky.
If you have valuable data on your disk, either backup it under linux before doing any write, or just do the same as with sparc h/w.