LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Closed Thread
  Search this Thread
Old 01-14-2012, 08:32 PM   #1
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Rep: Reputation: 30
Lost root password


Hello, I lost root password on an old linux box that I need to recover. I remember that the password is not complex, so brute forcing should be possible, however I'm currently looking to find a user escalation vulnerability because this would likely be faster.

In the event that this fails, does anyone know of a script I could use to brute force my password?

(This is a local Mandriva box. I have the password for a non-root user.)

Thanks in advance.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 01-14-2012, 08:35 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

Hi Geminias,

Why you want to go for brute force. Isn't the following method easy :-)

http://forum.mandriva.com/en/viewtopic.php?t=132578
 
1 members found this post helpful.
Old 01-14-2012, 08:36 PM   #3
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Since the answer to this would likely be a breach of the LQ rules, i wont tell you how to do it.
But a google search will have the answer.
 
Old 01-14-2012, 08:41 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

@ fukawi1,

I don't think so that suggesting how to reset a root password using single user mode is violation to LQ rules. LQ prohibit talks on hacking and going in single usermode when you have physical access to the system (in single user mode you do not have network connectivity so person has to be physically there) is not hacking. And if a person has physical access to the system then he can do anything with the system if he want :-) hacking not required ;-)

@ Moderators

Moderators please correct if I am wrong. If I am then I sincerly apologise for my earlier post.

Last edited by T3RM1NVT0R; 01-14-2012 at 08:43 PM.
 
Old 01-14-2012, 08:58 PM   #5
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
This is a good suggestion Terminator,

I'm currently just trying to figure out how to get GRUB boot loader menu to display because I configured it to hide the menu on startup.

I tried holding shift and escape, but to no avail.

Obviously since I don't have root access, I can't just edit menu.lst either...

Anyone know a sure way to boot into safe mode?
 
Old 01-14-2012, 09:04 PM   #6
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
And I lost my Mandriva disc, so that's not an option either.
 
Old 01-14-2012, 09:12 PM   #7
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
@ Reply

In that case I am out of suggestions.
 
Old 01-14-2012, 09:21 PM   #8
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
A couple of thoughts,
1) is sudo set up, to enable you to change the root passwd using the normal user accounts password
2) can you burn a new iso as a user?
You can boot to a live cd and modify /etc/passwd manually

http://linuxgazette.net/107/tomar.html describes a couple of ways
 
Old 01-14-2012, 09:27 PM   #9
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
Yeah this sucks. My main deboccle is my internet sucks and I don't have a liveCD currently downloaded.

Was hoping to gain access tonight.

[MODERATED]

Last edited by unSpawn; 01-15-2012 at 03:55 AM. Reason: //Frustration OK but expressing it that way: NO
 
Old 01-14-2012, 10:30 PM   #10
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
I found a Live-CD, tried to mount my mandriva partition, and getting error that it can't mount because
it doesn't contain a valid partition table.

Isn't it great how a simple thing can turn into an impossible thing?

EDIT: it just occurred to me the problem is that my Live-CD is fedora 8 which is pretty old one. My hard drive is ext4 which it probably can't recognize.

Last edited by Geminias; 01-14-2012 at 10:32 PM.
 
Old 01-14-2012, 10:58 PM   #11
realbluntz
Member
 
Registered: Jun 2010
Location: the D
Distribution: arch x86_64
Posts: 57

Rep: Reputation: 3
If you have the root password hash and know the hash type, you can [MODERATED]

Last edited by unSpawn; 01-15-2012 at 03:55 AM. Reason: //LQ Rule violation
 
Old 01-15-2012, 03:57 AM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
For your edification

Quote:
Originally Posted by fukawi1 View Post
Since the answer to this would likely be a breach of the LQ rules, i wont tell you how to do it.
Creating a new root account password (un-passworded runlevel 1 or S entry, alternative bootable medium) is not a breach of the LQ Rules as the myriad of threads on the subject show. What is a breach of the LQ Rules would be:

0) aiding the OP accomplishing things wrt his or her misguided approach:
Quote:
Originally Posted by Geminias View Post
I'm currently looking to find a user escalation vulnerability because this would likely be faster.
...or

1) misguided attempts at promoting brute-forcing:
Quote:
Originally Posted by realbluntz View Post
If you have the root password hash and know the hash type, you can [MODERATED]
 
2 members found this post helpful.
Old 01-15-2012, 04:05 AM   #13
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Thanks for clearing that up.
 
Old 01-15-2012, 02:10 PM   #14
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
"misguided" approach. It's my machine, my data, my life. I can do whatever I want with it.

Or you want me to call up old Adolf and restore the Reich?
 
Old 01-15-2012, 02:13 PM   #15
Geminias
Member
 
Registered: Sep 2005
Posts: 201

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by T3RM1NVT0R View Post
Hi Geminias,

Why you want to go for brute force. Isn't the following method easy :-)

http://forum.mandriva.com/en/viewtopic.php?t=132578
After booting to LiveCD I downloaded overnight, i was able to mount the partition, edit the menu.lst file and boot into safe mode.

From there I was able to follow these instructions. Just wanted to say thanks!
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Lost root password Darlene Linux - Newbie 9 02-23-2010 03:27 PM
Lost root password Elong Debian 4 11-18-2006 05:35 AM
Lost root password Nectalathiel SUSE / openSUSE 2 12-26-2004 01:28 PM
Lost Root Password ThaMainframe Mandriva 4 11-12-2004 05:27 PM
Lost My root password !!! hitesh_linux Linux - General 33 04-14-2003 08:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration