You are not logged in.

#1 2005-06-29 15:10:04

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

root pass problem

im having a little problem with a centos machine i just set up... i seem to did something wrong when i entered the password, or im just plain stupid and forgot which i entered, either way, i was thinking if its possible to do something about it , at least with a livecd or whatever you can think of.

I just dont want to resintall the whole thing, its a P2 450 and it takes its time to install... but if there is no other way i dont care, as i didnt got to configure anything.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#2 2005-06-29 15:13:20

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: root pass problem

yeah, boot the liveCD, chroot and use "passwd" to change it 8)

Offline

#3 2005-06-29 15:39:24

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: root pass problem

You don't even need the Live CD - boot into single-user mode and sort yourself out.

Offline

#4 2005-06-29 15:49:10

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: root pass problem

tomk wrote:

You don't even need the Live CD - boot into single-user mode and sort yourself out.

really? *writes that down*

Offline

#5 2005-06-29 15:53:03

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: root pass problem

No, not really. Sorry everyone - rare sunshine in this neck of the woods has obviously done something to my brain. You need the root password for single-user mode, don't you?! DOH... :oops:

Offline

#6 2005-06-29 16:05:16

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: root pass problem

sad

Offline

#7 2005-06-29 18:55:43

droog
Member
Registered: 2004-11-18
Posts: 877

Re: root pass problem

In the "baseball bat" thread, disable root and gain su access, z4ziggy mentioned you can bypass root password with grub single user somehow too. Maybe there is a way. i've read it a couple other places too but cant find them or any details on how.

Offline

#8 2005-06-29 18:55:48

Mythoz
Member
Registered: 2004-04-25
Posts: 58

Re: root pass problem

It's very easy to change the root passwd if you have access to the boot manager. Just append "init=/bin/bash" to your boot line. Now you have full root privileges.

Then you must enable write access for the root directory:
# mount -o remount,rw /

Change yor root password
# passwd

Finally rollback and reboot
# mount -o remount,ro /
# sync && sync && sync && sleep 3 && shutdown -r -n now

Offline

#9 2005-06-29 19:16:39

sud_crow
Member
From: Argentina
Registered: 2003-06-30
Posts: 546
Website

Re: root pass problem

Hi,

Well, im going with phrakture option first, as its the simplest method.

tomk and drug smile yep, you need root for that.

Mythoz, i dont know if i can dinamically edit GRUB bootloader (that is, during startup), but i know LILO cant be, and to edit it from the running system, i should have root access, which i dont... but i could gain it through a livecd, though i think its easier to chroot in to it.


Leonardo Andrés Gallego
www.archlinux-es.org || Comunidad Hispana de Arch Linux

Offline

#10 2005-06-29 19:22:20

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: root pass problem

Mythoz wrote:

t's very easy to change the root passwd if you have access to the boot manager. Just append "init=/bin/bash" to your boot line. Now you have full root privileges.

But you need root priveleges for that. :?

Offline

#11 2005-06-29 19:28:27

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: root pass problem

Gullible Jones wrote:
Mythoz wrote:

t's very easy to change the root passwd if you have access to the boot manager. Just append "init=/bin/bash" to your boot line. Now you have full root privileges.

But you need root priveleges for that. :?

no you don't - if you're using grub, hit "e" to edit the line before you boot

Offline

#12 2005-06-29 19:30:19

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: root pass problem

D'oh!

(Hmm... That's a local vulnerability! Any way of disabling editing of the boot line from within GRUB?)

Offline

#13 2005-06-29 19:42:15

Kern
Member
From: UK
Registered: 2005-02-09
Posts: 464

Re: root pass problem

you dont need the root password to use "single user" mode.

You do need access to Grub / lilo tho ....  anyway, its covered here ....

Howto

and yes, you can password protect the bootloader.
but we are on the way back to  "how secure is a pc" type of thread.

edited: typo's an ting

Offline

#14 2005-06-29 19:50:23

TheDoctor
Member
From: Ontario, Canada
Registered: 2005-06-28
Posts: 63
Website

Re: root pass problem

Gullible Jones wrote:

D'oh!

(Hmm... That's a local vulnerability! Any way of disabling editing of the boot line from within GRUB?)

No, that's not a local vulnerability.  A local vulnerability would be a user account escalating privelidges.   This is considered "Game Over".  If an attacker has physical access to your machine, then disabling this would mean nothing.   When I forget the root password, I just boot any live distro, mount /dev/hda1 or wherever I can find /etc/, and just edit the passwd file.  Hell, you can even do it with an old slack install CD, or a mini distro that you can fit on a credit card sized CD.

Offline

Board footer

Powered by FluxBB