Hi!
If it's a linux system which has / on firs partition on first primary drive do this:
Download Slackware boot & root disks, they are best.
Boot from thoose floppies!
login as root (no password)
if dir /mnt dosen't allready exist do:
mkdir /mnt
now comes the tricky part:
do this:
mount -t ext /dev/hda1 /mnt
if you have another partition for your /usr
you need to mount that partition too:
mount -t ext /dev/hda5 /mnt/usr
or whatever device it is.
Now you can do this:
/mnt/usr/sbin/chroot /mnt /bin/bash
Now you have your real / as /:
Just do:
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
and u can use vi to edit /etc/passwd.
when done just reboot and look happy.
If it's anothe Unix than Linux, than you might still be able to use Linux boot disks to recover at least the passwd file since linux can mount at least Solaris partitions.
Hope this helps!
/Hasse