don't panic.
Please read carefully.
If you have an alternate passwd file, you can use mv to get it into place.
mv alt_passwd /etc/passwd
I want you to check the permissions on the /etc/passwd file. It may be that the permissions are such that you can edit it as a normal user. If the permissions are at least 755, you should be able to replace it with a temporary passwd file. OR Do you have another copy of the passwd file (ie passwd.orig)?
However, if that is not the case, you will have to reboot to single user mode.
IF you have one, you may have to boot with your system disk to get it to come up to single depending on if the system tries to read the passwd file.
If none of these is true, then your options are slim. You have to have one of three things for you to recover.
1) an alternate passwd file you can move into place if the permissions will allow.
2) create a new passwd file with limited users in it, system IDs only.
3) reboot to single and do #2.
If not, then you are stuck. I would suggest in the future to make a tar of your root filesystem for just such an occasion.
Sorry if this doesn't help. The last option as you probably have guessed is reload/reinstall the OS.