Re: root shell not found
- From: Nico Kadel-Garcia <nkadel@xxxxxxxxx>
- Date: Fri, 25 Jan 2008 00:25:45 -0800 (PST)
On 24 Jan, 20:09, Bill Marcum <marcumb...@xxxxxxxxxxxxx> wrote:
On 2008-01-24, Jeff <j...@xxxxxxxxx> 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.
.
- References:
- root shell not found
- From: Jeff
- Re: root shell not found
- From: Bill Marcum
- root shell not found
- Prev by Date: Re: Verizon/LG VX8300 Dialup
- Next by Date: Re: upgrading FC6 -> FC8 - Error enabling swap device hda5: no such device or address
- Previous by thread: Re: root shell not found
- Next by thread: network connection
- Index(es):
Relevant Pages
|