News:

Wieners, Brats, Franks, we've got 'em all.

Main Menu

Uh oh, forgot root password

Started by Joe, September 21, 2005, 05:40:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

Yep. Forgot the root password to cave. =(.

Does anyone know any way I can get it back? I have physical access to the box, so using a startup CD is no problem at all.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Blaze

And like a fool I believed myself, and thought I was somebody else...

Newby

Eh, start the box with the boot CD, get to a shell, mount your drive, and uh, /etc/passwd / /etc/shadow <-- play with those files.

Otherwise, dunno.
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Eric

IIRC, can't you just setpwd in single-user mode?

Newby

Quote from: LoRd[nK] on September 21, 2005, 08:01:40 PM
IIRC, can't you just setpwd in single-user mode?

passwd <username> works too, I think. But you have to be root, so eh
- Newby
http://www.x86labs.org

Quote[17:32:45] * xar sets mode: -oooooooooo algorithm ban chris cipher newby stdio TehUser tnarongi|away vursed warz
[17:32:54] * xar sets mode: +o newby
[17:32:58] <xar> new rule
[17:33:02] <xar> me and newby rule all

Quote from: Rule on June 30, 2008, 01:13:20 PM
Quote from: CrAz3D on June 30, 2008, 10:38:22 AM
I'd bet that you're currently bloated like a water ballon on a hot summer's day.

That analogy doesn't even make sense.  Why would a water balloon be especially bloated on a hot summer's day? For your sake, I hope there wasn't too much logic testing on your LSAT. 

Quik

Did you have the insite to give yourself sudo priviledges?
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

mynameistmp

When you get to your LILO prompt:

Quote
LILO: linux init=/bin/bash

Instead of starting /sbin/init and proceeding with the usual /etc/rc.d/* procedure the kernel will just give you a shell. Not of much use to you, the hdd is mounted read only since it never had a chance to get checked and remounted read/write.

Quote
# mount -o remount,rw /

Now you can use passwd to change your password. Don't reboot yet. Since init isn't running there is no process in place for safely taking the system down. remount the root filesystem again.

Quote
# mount -o remount,ro /

Reboot.

Btw, this works on any linux system running LILO as a boot manager, so if ever you have console access to someone's box...

Quik

Ahh, so this is what you were talking about. So many neat tricks :p
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

mfqr

a more fun way would be to backup all ur stuff and rm -rf /*.

Joe

#9
QuoteWhen you get to your LILO prompt:
I don't use LILO. =(
Quotea more fun way would be to backup all ur stuff and rm -rf /*.
...................

@Quik: I have sudo privlidges. I guess why it didn't work is because I was doing su instead.

EDIT -
joe@dave:~ $ sudo passwd root
Password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


mfqr

Quote from: Joe[e2] on September 22, 2005, 07:46:51 AM
QuoteWhen you get to your LILO prompt:
I don't use LILO. =(
Quotea more fun way would be to backup all ur stuff and rm -rf /*.
...................

@Quik: I have sudo privlidges. I guess why it didn't work is because I was doing su instead.

EDIT -
joe@dave:~ $ sudo passwd root
Password:
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

You are no fun  :o.

Quik

Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.

Don't say that, ever agian. You sound like c0n.
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Krazed

Quote from: Quik on September 22, 2005, 06:58:35 PM
Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.

Don't say that, ever agian. You sound like c0n.

*cough*... Anyway, That's a neat trick tmp.
It is good to be good, but it is better to be lucky.

Quik

Quote from: Krazed on October 06, 2005, 07:56:12 PM
Quote from: Quik on September 22, 2005, 06:58:35 PM
Quote from: mfqr on September 21, 2005, 10:13:54 PM
a more fun way would be to backup all ur stuff and rm -rf /*.

Don't say that, ever agian. You sound like c0n.

*cough*... Anyway, That's a neat trick tmp.

Yeah, I hint oh-so-subtle. Oh, and nice bump for what a pointless post. -1 ;)
Quote[20:21:13] xar: i was just thinking about the time iago came over here and we made this huge bomb and light up the sky for 6 min
[20:21:15] xar: that was funny

Krazed

It was only 10 days! I don't wanna hear it.
It is good to be good, but it is better to be lucky.