Unix Technical Forum

Re: root shell not found

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: > > > > > ...


Go Back   Unix Technical Forum > Unix Operating Systems > Linux Operating System

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 01-27-2008, 05:35 AM
Nico Kadel-Garcia
 
Posts: n/a
Default Re: root shell not found

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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:26 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com