Linux Debian support - Got to start all over

This is Interesting: Free IT Magazines  
Home > Archive > Linux Debian support > September 2005 > Got to start all over





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Got to start all over
Frederick Wilson

2005-09-22, 8:48 pm

I can not figure out what my root password was.

I was installing debian and was having problems with X. I got called to
duty to go help in Mississippi and now I can not get back in because I
can not remember ROOT

Is the only option to start over?

Fred
Bryan Donlan

2005-09-23, 2:47 am

Frederick Wilson wrote:

> I can not figure out what my root password was.
>
> I was installing debian and was having problems with X. I got called to
> duty to go help in Mississippi and now I can not get back in because I
> can not remember ROOT
>
> Is the only option to start over?
>
> Fred


If you are using Grub:
Boot the computer
At the grub menu press 'e', move to the line with the kernel on it, press
'e' again
Add ' init=/bin/sh' to the end
Press enter, then 'b'
Once you have a shell prompt, type:

mount -nt procfs /proc /proc
mount -n -o remount,rw /
passwd
# change your password
mount -o remount,ro /
umount -n /proc
sync;sync;sync
reboot -f

In lilo a similar procedure will work but I don't know how to get the
init=/bin/sh entry in.

--
λz.λi.i(i((λn.λm.λz.λi.nz(λq.mqi))((λn.λz.λi.n(nzi)i)(λz.λi.i(((λn.λz.λi.n
(nzi)i)(λz.λi.i(iz)))zi)))((λn.λz.λi.n(nzi)i)(λz.λi.i(iz)))zi))
Michael Perry

2005-09-25, 2:46 am

On Fri, 23 Sep 2005 00:40:54 -0400, Bryan Donlan wrote:
> Frederick Wilson wrote:
>
>
> If you are using Grub:
> Boot the computer
> At the grub menu press 'e', move to the line with the kernel on it, press
> 'e' again
> Add ' init=/bin/sh' to the end
> Press enter, then 'b'
> Once you have a shell prompt, type:
>
> mount -nt procfs /proc /proc
> mount -n -o remount,rw /
> passwd
> # change your password
> mount -o remount,ro /
> umount -n /proc
> sync;sync;sync
> reboot -f
>
> In lilo a similar procedure will work but I don't know how to get the
> init=/bin/sh entry in.
>


If you are booting lilo, hit the shift or perhaps the ctrl key. Maybe
the shift key and enter linux init=/bin/bash

That should get ya close

--
Michael Perry | do or do not. There is no try. -Master Yoda
mperry@lnxpowered.org | http://www.lnxpowered.org
Eric Pozharski

2005-09-25, 8:46 pm

Frederick Wilson <faNOTTHISwilson@comcast.net> wrote:
> I can not figure out what my root password was.
>
> I was installing debian and was having problems with X. I got called to
> duty to go help in Mississippi and now I can not get back in because I
> can not remember ROOT
>
> Is the only option to start over?


Nope. You have four options.

[1] The easy way.
[1a] Boot from Leave-CD (that will give you GUI);
[1b] then launch editor and feed it with
'/where/your/real/rootpartition/etc/passwd';
[1c] then remove everything (supposed you have a lone letter 'x' there)
between 1st and 2nd colons (so removing a password at all);
[1d] reboot;
[1e] login as root (you won't be asked for password);
[1f] use 'passwd';
[1g] logout.

[2] The hard way.
[2a] Boot from a disk with your Debian distribution (the 1st disk will
be OK);
[2b] launch shell on the VT2;
[2c] go through dialogs on the VT1 while you'll find that your root
partition is mounted;
[2d] then follow from the point [1b].

[3] The die hard way.
[3a] Same as [2a];
[3b] Same as [2b];
[3c] issue: 'mkdir /fakeroot'
[3d] issue: 'mount /fakeroot /dev/yourrootpartition'
[3e] then follow from the point [1b].

[4] The fake way.
[4a] Remember your root password.

--
Torvalds' goal for Linux is very simple: World Domination
(it's third person quote.)
Fred Wilson

2005-09-26, 5:54 pm

Man... All this seems pretty complex.


Eric Pozharski wrote:
> Frederick Wilson <faNOTTHISwilson@comcast.net> wrote:
>
>
>
> Nope. You have four options.
>
> [1] The easy way.
> [1a] Boot from Leave-CD (that will give you GUI);
> [1b] then launch editor and feed it with
> '/where/your/real/rootpartition/etc/passwd';
> [1c] then remove everything (supposed you have a lone letter 'x' there)
> between 1st and 2nd colons (so removing a password at all);
> [1d] reboot;
> [1e] login as root (you won't be asked for password);
> [1f] use 'passwd';
> [1g] logout.
>
> [2] The hard way.
> [2a] Boot from a disk with your Debian distribution (the 1st disk will
> be OK);
> [2b] launch shell on the VT2;
> [2c] go through dialogs on the VT1 while you'll find that your root
> partition is mounted;
> [2d] then follow from the point [1b].
>
> [3] The die hard way.
> [3a] Same as [2a];
> [3b] Same as [2b];
> [3c] issue: 'mkdir /fakeroot'
> [3d] issue: 'mount /fakeroot /dev/yourrootpartition'
> [3e] then follow from the point [1b].
>
> [4] The fake way.
> [4a] Remember your root password.
>

Unruh

2005-09-26, 5:54 pm

Fred Wilson <fawilson_NOT_THIS@comcast.net> writes:

>Man... All this seems pretty complex.


Less so than reinstalling.
For me the easiest way is the fifth way, to boot single user. Unless you put a password
into lilo, this will get you in as root
At the boot when lilo lists the options, hit esc or tab and type in
linux 1
This will bring you up in single user mode as root. Then do
passwd
and enter a new password for root.
grub has a similar option but since I do not use it, I do not know
it.


[vbcol=seagreen]
>Eric Pozharski wrote:
Madhusudan Singh

2005-09-26, 5:54 pm

Unruh wrote:

> Fred Wilson <fawilson_NOT_THIS@comcast.net> writes:
>
>
> Less so than reinstalling.
> For me the easiest way is the fifth way, to boot single user. Unless you
> put a password into lilo, this will get you in as root
> At the boot when lilo lists the options, hit esc or tab and type in
> linux 1
> This will bring you up in single user mode as root. Then do
> passwd
> and enter a new password for root.
> grub has a similar option but since I do not use it, I do not know
> it.
>


I could be wrong but IIRC, in Debian, a linux single boot usually lands you
at a prompt which asks for root password for maintenance (and Control-D for
something else).
Fred Wilson

2005-09-26, 5:54 pm

If it is that simple it sure seem like it is a bit unsecure?

Unruh wrote:[vbcol=seagreen]
> Fred Wilson <fawilson_NOT_THIS@comcast.net> writes:
>
>
>
>
> Less so than reinstalling.
> For me the easiest way is the fifth way, to boot single user. Unless you put a password
> into lilo, this will get you in as root
> At the boot when lilo lists the options, hit esc or tab and type in
> linux 1
> This will bring you up in single user mode as root. Then do
> passwd
> and enter a new password for root.
> grub has a similar option but since I do not use it, I do not know
> it.
>
>
>
>
Bill Marcum

2005-09-26, 5:54 pm

On Mon, 26 Sep 2005 12:18:07 -0500, Fred Wilson
<fawilson_NOT_THIS@comcast.net> wrote:
> If it is that simple it sure seem like it is a bit unsecure?
>

Most operating system security measures cannot protect against someone
with physical access to the machine.


--
"The algorithm to do that is extremely nasty. You might want to mug
someone with it."
-- M. Devine, Computer Science 340
Unruh

2005-09-26, 5:54 pm

Fred Wilson <fawilson_NOT_THIS@comcast.net> writes:

>If it is that simple it sure seem like it is a bit unsecure?


Of course it is insecure. If your opponent has physical access to your
machine, then it is insecure, no matter what you do. YOu can plug this hole
if you wish (eg demanding a password for single user mode) but then of
course you cannot use this to recover from having forgotten your password.
Your opponent can always open up your machine, plug the hard disk into his
own computer and do anything he wants with it. Or he can put in a CD and
boot up an operating system and do anything he wants to your hard disk
(unless you have a bios password which protects against this, in which case
he can open the case, and reset the CMOS and the bios password.)
Ie, physical access to a machine is insecure, and this is no more insecure
than that.


[vbcol=seagreen]
>Unruh wrote:
Eric Pozharski

2005-09-27, 8:46 pm

Unruh <unruh-spam@physics.ubc.ca> wrote:
> Fred Wilson <fawilson_NOT_THIS@comcast.net> writes:
>

Look. As soon as you'll grok the complexity, it will be power.
[vbcol=seagreen]
> Less so than reinstalling.


After some reconsidering, I wouldn't say reinstalling is the worst way.
If upgrade works, why reinstalling won't suffice? Supposing you've
played some with a distro, you can make different choices. (Personal
success story skipped.)

> For me the easiest way is the fifth way, to boot single user. Unless
> you put a password into lilo, this will get you in as root


I'm ashamed. How can I have forgotten that? You won. Should I plonk
myself?

> At the boot when lilo lists the options, hit esc or tab and type in
> linux 1 This will bring you up in single user mode as root.


As noted later in the thread, that won't work. But there is (was?)
option. Feed the kernel with 'init=/bin/sh' at the command line -- That
will skip all the scripts and security at once.

> Then do passwd and enter a new password for root.


Anyway you must manualy remove the 2nd field in the /etc/passwd.
Because passwd command will ask your *current* (iow: forgotten)
password.

--
Torvalds' goal for Linux is very simple: World Domination
(it's third person quote.)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com