LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-08-2007, 10:17 AM   #1
jindalaman1987
LQ Newbie
 
Registered: Jan 2007
Posts: 2

Rep: Reputation: 0
how to recover root passwd if bootloader password in not set


I am using fc5. i havent set the bootloader password for the system
could anybdy tell me how can i recover the root password of my system

thanks.
 
Old 03-08-2007, 10:50 AM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
When you boot to grub, edit the kernel line (follow the prompts under the box: 'e' to edit) and add the option 'single'. For example:

Code:
title Fedora Core (2.x.y)
        root (hd0,0)
        kernel /vmlinuz-2.x.y ro root=LABEL=/ quiet single
        initrd /initrd-2.x.y.img
Then boot, and the system will be in single user mode at a root prompt. You can issue the 'passwd' command to change the root password and the reboot.

passwd
...
shutdown -r now
 
Old 03-08-2007, 12:37 PM   #3
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
For completeness--recovering the root password is not related to whether you have a bootloader password set.
 
Old 03-08-2007, 12:42 PM   #4
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
As near as I can tell, that won't work on a current installation of Debian Etch, and I wouldn't want it to ... If someone can verify that I am wrong, I'd appreciate it.
 
Old 03-08-2007, 12:47 PM   #5
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The OP noted that FC5 is in use, and it certainly will work on that release. Any system that uses lilo or grub as a boot loader will allow this operation (I assume Etch uses one or the other).

This is not a security issue; physical access to a machine implies absolute control.
 
Old 03-09-2007, 01:11 AM   #6
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I have not been able to do it. I only added to this thread because I have not gotten any further responses on the one linked here. I am simply looking for verification one way or the other.
 
Old 03-09-2007, 09:49 AM   #7
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
I see from the other thread that Debian requires a password even in single user mode. That sounds like security, but it's not. Since you have physical access, boot Knoppix or any live Linux CD/DVD), open a terminal, and change the (liveCD) root password. Edit /etc/shadow (the liveCD one) and copy the hash to the /etc/shadow on the system root for the real system. You've just changed the password, the old fashioned way.

Last edited by macemoneta; 03-09-2007 at 09:51 AM.
 
Old 03-09-2007, 03:00 PM   #8
rickh
Senior Member
 
Registered: May 2004
Location: Albuquerque, NM USA
Distribution: Debian-Lenny/Sid 32/64 Desktop: Generic AMD64-EVGA 680i Laptop: Generic Intel SIS-AC97
Posts: 4,250

Rep: Reputation: 62
I acknowledged on the other thread that it could be done with a live CD ... As I view it, that requires considerably more sophistication than the method described above. Given time, certainly, root can be compromised, but not in 30 seconds or less by a relatively unknowledgable user..
 
Old 03-09-2007, 03:06 PM   #9
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Quote:
...but not in 30 seconds or less by a relatively unknowledgable user..
I guess you're defining that to be anyone that has never heard of nor had access to the Internet. Not too many left, I'm afraid.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to recover the password of bootloader reply2vinay Linux - Software 6 03-10-2008 10:14 PM
recover root passwd in hpux gsr_kashyap Other *NIX 6 03-01-2006 11:58 PM
passwd set password to blank - always fantunes Linux - Security 4 07-27-2004 06:41 AM
recover root passwd red hat 8 simquest Linux - Software 1 09-17-2003 10:21 AM
recover root passwd simquest Linux - Software 1 07-17-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:23 AM.

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