Re: root shell

From: K7MEM (k7mem_at_myrealbox.com)
Date: 08/03/04


Date: Tue, 03 Aug 2004 06:32:53 -0700

Levente KOVACS wrote:
> Hi folks,
>
>
> By mistake, I added to /etc/passwd the root shell as /sbin/bash, which
> was invalid.
>
> After logging out, I could not login as root... It said "shell is
> invaid" or something like that. I have tried to su, but no succes.
>
> Finaly, I inserted the install CD, and booted the system... I could get
> shell there, but I could not mount the root partition of my disk.
>
> So I went further of the install process, and it mounted the filsystem
> to /a, so I coudl correct my mistake.
>
> Is there any other way to specify root shell by an ordinary user? Or
> some workaround for things like this?
>
>
> Thanx: Levente

If you booted single user to the CD then you should have been able to
mount the root file system and edit the password file.

Did you boot single user and what was the command you used to do the
mounting?

-- 
Martin E. Meserve
k7mem@myrealbox.com
http://www.k7mem.150m.com


Relevant Pages

  • summary: root disk crashed!!!!
    ... D1000 sun storedge attached to it....the root disk of this server having ... i am doing restoration by booting through the sun cdrom in single user ... mode & restoring it through "ufsrestore rvf". ...
    (SunManagers)
  • Re: wrong root password
    ... >> This is probably in the manual, but boot single user (add single to the ... >> prevent people from becomming root on your machine if you care (i.e. ... >> it's not a private machine). ... # mount -o remount,rw / ...
    (alt.os.linux.suse)
  • Re: root password
    ... Log on as root and run ... passwd or as root do ... ways-- remove the disk from the computer, install it on another computer, ... boot single user and hope it is not set up to demand a password for root ...
    (alt.os.linux.suse)
  • Re: directories do not shrink automatically
    ... else is lightning faster than my ugraded-to-etch sarge setup..its go dir_index set. ... You need to be root otherwise. ... I suppose if I really want it, I'll have to hook up a screen and do the single user bollox. ...
    (comp.os.linux.misc)
  • Re: hda: DMA timeout error, is it a problem ?
    ... understand it, the root partition is mounted read-only so fsck can run and fix minor problems. ... If that fails, you're dumped into a single user shell, to run fsck manually, and with root still mounted read-only. ... But if the fsck is OK, root is remounted read/write, so you can do system maintenance work from single user. ...
    (Debian-User)