Author Topic: Uh oh, forgot root password  (Read 5671 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Uh oh, forgot root password
« on: September 21, 2005, 05:40:12 pm »
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.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Blaze

  • x86
  • Hero Member
  • *****
  • Posts: 7136
  • Canadian
    • View Profile
    • Maide
Re: Uh oh, forgot root password
« Reply #1 on: September 21, 2005, 06:16:45 pm »
Wiping Drive - 27% complete...
And like a fool I believed myself, and thought I was somebody else...

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Uh oh, forgot root password
« Reply #2 on: September 21, 2005, 07:19:54 pm »
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

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. 

Offline Eric

  • Full Member
  • ***
  • Posts: 304
  • I'm new here!
    • View Profile
Re: Uh oh, forgot root password
« Reply #3 on: September 21, 2005, 08:01:40 pm »
IIRC, can't you just setpwd in single-user mode?

Offline Newby

  • Moderator
  • Hero Member
  • *****
  • Posts: 10877
  • Thrash!
    • View Profile
Re: Uh oh, forgot root password
« Reply #4 on: September 21, 2005, 08:43:22 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

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. 

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Uh oh, forgot root password
« Reply #5 on: September 21, 2005, 08:57:15 pm »
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

Offline mynameistmp

  • Moderator
  • Full Member
  • *****
  • Posts: 111
  • Hi! I'm new here!
    • View Profile
Re: Uh oh, forgot root password
« Reply #6 on: September 21, 2005, 09:19:25 pm »
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...

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Uh oh, forgot root password
« Reply #7 on: September 21, 2005, 09:40:56 pm »
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

Offline mfqr

  • Newbie
  • *
  • Posts: 25
  • I'm new here!
    • View Profile
Re: Uh oh, forgot root password
« Reply #8 on: September 21, 2005, 10:13:54 pm »
a more fun way would be to backup all ur stuff and rm -rf /*.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: Uh oh, forgot root password
« Reply #9 on: September 22, 2005, 07:46:51 am »
Quote
When you get to your LILO prompt:
I don't use LILO. =(
Quote
a 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
« Last Edit: September 22, 2005, 07:51:46 am by Joe[e2] »
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline mfqr

  • Newbie
  • *
  • Posts: 25
  • I'm new here!
    • View Profile
Re: Uh oh, forgot root password
« Reply #10 on: September 22, 2005, 04:56:38 pm »
Quote
When you get to your LILO prompt:
I don't use LILO. =(
Quote
a 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.

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Uh oh, forgot root password
« Reply #11 on: September 22, 2005, 06:58:35 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

Offline Krazed

  • Moderator
  • Hero Member
  • *****
  • Posts: 1822
    • View Profile
Re: Uh oh, forgot root password
« Reply #12 on: October 06, 2005, 07:56:12 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.

Offline Quik

  • Webmaster Guy
  • x86
  • Hero Member
  • *****
  • Posts: 3262
  • \x51 \x75 \x69 \x6B \x5B \x78 \x38 \x36 \x5D
    • View Profile
Re: Uh oh, forgot root password
« Reply #13 on: October 06, 2005, 09:04:07 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

Offline Krazed

  • Moderator
  • Hero Member
  • *****
  • Posts: 1822
    • View Profile
Re: Uh oh, forgot root password
« Reply #14 on: October 08, 2005, 08:25:57 am »
It was only 10 days! I don't wanna hear it.
It is good to be good, but it is better to be lucky.