No, you can't do that on Solaris. The FAW points out that the two
easiest choices are:
1). the CDROM thing
2). if you are running NIS, get in through another host.
3). Some folks keep an alter-ego with UID 0 and some password that's locked in the
If all of the above fails, buy another system, install on it, then take the disk
the broken one, mount on the new one, etc, etc.
Speaking only for myself,
PS: It is a good idea to have anyone who does this sort of thing read
the messages about 'root shell disease' and present an elaborate statistical
analysis of the prenomenon.
> > .... that you may be able to help me with.
> > One of the junior sys admin guys here has managed to lose the root shell by
> > specifying an incorrect path in /etc/passwd. He changed roots shell path to
> > /sbin/ksh from /bin/ksh. We cannot now log onto this box as root as we have
> > no shell, and in having no root permissions I cannot telnet, rlogin or ftp
> > to the macine to correct the entry. Help much appreciated on this as it is
> > one of our mission critical boxes.
> If a simple "su" doesn't work, the following *might* work.
> $ su - root -c "exec /sbin/ksh"
> If you can't su either, you'll probably have to boot from a CD-ROM,
> mount the root filesystem (after an fsck) and edit /mnt/etc/passwd
> Nicholas Dronen