This is a discussion on Re: root shell not found within the Linux Operating System forums, part of the Unix Operating Systems category; --> On 24 Jan, 20:09, Bill Marcum <marcumb...@bellsouth.net> wrote: > On 2008-01-24, Jeff <j...@rahul.net> wrote: > > > > > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| On 24 Jan, 20:09, Bill Marcum <marcumb...@bellsouth.net> wrote: > On 2008-01-24, Jeff <j...@rahul.net> wrote: > > > > > I got a laptop with fedora on it, assumed it was installed with all > > the > > 'normal' shells but apparently it was not. *I edited the /etc/passwd > > file and > > changed root's shell to /bin/tcsh, then when I switched users and > > tried to > > su again, there is no /bin/tcsh! *Im so mad at myself and I dont see a > > way to > > fix this easily without re-installing the whole OS. > > > Does anyone have a good idea to fix or solve this? > > > Thanks for any help! > > Maybe you can use sudo to edit /etc/passwd or install tcsh or even make > a temporary symlink from /bin/sh to /bin/tcsh. *If not, if it boots with > Grub, press "e" to edit the kernel command line, and add "init=/bin/sh". > That should give you a shell where you can edit /etc/passwd. > Or you could boot a live CD... OK, first, never edit /etc/passwd without using "vipw". This useful command does sanity checking on your changes, and will help prevent you from making dangerous mistakes. Also, to change a user's password, use "usermod", not direct editing. Also, *DON'T CHANGE ROOT'S SHELL!!!!!!* Seriously, there are a big variety of init and configuration tools which can become extremely unhappy if you pull a stunt like that. Root is not a normal user, and should not be treated as one. In the meantime. You need a live Linux CD, or your installation CD for Fedora, and to boot from the CD. With the Fedora CD, you can type "linux rescue" and it will try to find your disks and mount them for you. Then you can use "vi" to edit the mounted file at /mnt/sysimage/ etc/passwd. |