Complete.Org: Mailing Lists: Archives: linux-help: August 2000:
[linux-help] Re: root password
Home

[linux-help] Re: root password

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: linux-help@xxxxxxxxx
Subject: [linux-help] Re: root password
From: Tom Hull <thull@xxxxxxxxxxx>
Date: Mon, 21 Aug 2000 12:51:20 -0500
Reply-to: linux-help@xxxxxxxxx

Jonathan Hall wrote:
> 
> As I recall, even single-user mode asks for a root password.

It seems like I've seen this, too, but I tested it on one of my machines and
did not need a password. Booting into single user mdoe is the traditional Unix
way to fix a corrupted/forgotten root password. It used to be expected that
the console device would be physically secure (e.g., in a locked room). With
Linux running on PCs, this is often not the case, so it would make sense to
provide some sort of option to require password even in single user mode.
However, that would be a mere band-aid, as there are lots of ways to get
around the root password if you have physical access to the machine.

> I suppose if nothing else, you could specify /bin/bash as the init process,
> which obviously would not ask for a password.

Yes, put

  init=/bin/bash

on the boot command line. This is more limited than init s, but adequate.

> On Mon, Aug 21, 2000 at 12:53:29AM -0500, Tom Hull wrote:
> > For future reference:
> >
> > You should also be able to boot the system into "single user mode", which 
> > will give
> > you a root shell w/o password (assuming you have physical access to the 
> > console;
> > nothing else is running). At your lilo prompt, type
> >
> >    linux s
> >
> > replacing "linux" with whatever your kernel is called in /etc/lilo.conf; 
> > you can
> > probably replace "s" with "single" -- I only tested the former.
> >
> > Once you are running as root, edit /etc/shadow to remove the root password, 
> > or
> > /etc/passwd if you are not using shadow passwords. (Of course, you _should_ 
> > be
> > using shadow passwords.) To switch to multi-user mode, run
> >
> >    init 3
> >
> > or reboot. (If you normally come up with a X running and some sort of 
> > graphic
> > login, you're probably at runlevel 5 rather than 3. The runlevel numbers are
> > pretty arbitrary -- they really just tell init to run scripts from 
> > /etc/rc.d/rc?.d/,
> > where ? is your intended runlevel.)

-- 
/*
 *  Tom Hull * thull@xxxxxxxxxxx * http://www.ocston.org/~thull/
 */

-- This is the linux-help@xxxxxxxxx list.  To unsubscribe,
visit http://tmp2.complete.org/cgi-bin/listargate-aclug.cgi


[Prev in Thread] Current Thread [Next in Thread]