You're screwed. Get the Solaris CD and boot from it in single user mode.
Before you shutdown, check your partitions like this
df -kYou want to find out what partition has /etc/passwd
ok boot cdrom -swThen you need to mount the partition that has /etc/passwd and edit it. Hopefully you did the step above to find out what partition it is on before you rebooted, but it is probably something like.
mount /dev/dsk/c0t0d0s0 /mntThis will mount partition 0 on scsi device 0 at /mnt
Then you can edit the passwd file using sed (sorry, vi and emacs aren't on the boot cdrom)
You can see the passwd file using cat
cat passwd
sed s/badpath/goodpath/ passwd > passwd2Replace "badpath" and "goodpath" with the parts of the path that were wrong in your shell specification. I did this My passwd file said
root:x:0:1:Super-User:/:/sbin/tcshWhen it should have said
root:x:0:1:Super-User:/:/sbin/shSo I did this to fix it.
sed /tcsh/sh/ passwd > passwd2 mv passwd2 passwd cat passwdThat's it. Good luck.
Return to Gene's Home Page
Return to Gene's Random Unix Crap