Discussion Locked

No Shell

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Due to sloppy work on my part the default shell [ksh] is no longer in the location [/bin/ksh] that the is specified in the passwd file. Hence I cannot login in as root [no shell error]. Is there some method of specifing a shell for a givin login so that I can correct this?

5 replies

by ghislain.levesque

Hi,
there is more than one way to do it:
1- boot into sigle user mode from a cdrom with the option to write on the filesystem.
boot cdrom -ws
Mount your root partition in one of the existing directory and edit your /etc/password. Reboot, bingo, it's done

2- if you have a 2nd server, remove your disk and insert-it into the 2nd server reboot, mount you filesystem in a temp dir, and again edit your password file

Hope this help you, it has work for me!!

by buchanon

You should also be able to hit ctrl-alt-delete and when lilo comes
back up tell it to boot single user(I don't remember if it's -s or single to do this).
Then, after it does a few things, it should prompt you for the path
to sh which is usually /bin/sh.

at that point, you need to run fsck on your / partition
and then mount it read/write with
mount -rw /
then you can edit the password file and change the path
with vipw.

Hope that helps.
/mtb

This discussion is closed to new replies.