LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Reply
  Search this Thread
Old 07-08-2007, 03:55 PM   #1
admiralpaul
LQ Newbie
 
Registered: Nov 2006
Posts: 8

Rep: Reputation: 0
I have lost my root password.


I installed Mandriva Linux 2007 quite a while ago, and haven't really used it. Inspired by free time and, resultingly, boredom, I thought I'd give it another go. Unfortunately, I have forgotten my root password. I know it was something really long and complicated. It was a good password.

Is there anything I can do, or should I just reinstall Linux froms scratch?
 
Old 07-08-2007, 04:19 PM   #2
ilikejam
Senior Member
 
Registered: Aug 2003
Location: Glasgow
Distribution: Fedora / Solaris
Posts: 3,109

Rep: Reputation: 97
Hi.

You can get in with a Live CD and edit the /etc/passwd file:
http://wiki.clug.org.za/wiki/How_do_...ot_password%3F

Dave
 
Old 07-08-2007, 04:20 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
You could try using the search button on this page, or perhaps looking at the list of similar threads, below.
 
Old 07-09-2007, 01:45 AM   #4
sanjibgupta
Member
 
Registered: Apr 2003
Location: Kolkata
Posts: 215

Rep: Reputation: 30
Why dont to go linux rescue and change the password
 
Old 07-12-2007, 11:27 PM   #5
mastemmer
Member
 
Registered: Jul 2007
Location: Porto Alegre, Brazil
Distribution: Slackware
Posts: 44

Rep: Reputation: 17
Boot from a Live CD.
Mount your root partition in /mnt
Edit the file
/mnt/etc/shadow
The first line is something like this:
root:%%%%:13699:0:::::
The text between the first and second colon
is your encrypted root password. Erase it
or copy the encrypted password from another
user.
Reboot, now with a known root pw.
 
Old 07-13-2007, 01:10 AM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Everybody forgets the easy way. At the boot loader add 1 at the end of the line. This will boot into runlevel 1 which will automatically log into root. Then you can change the password by typing passwd.

LILO:
Type linux 1

GRUB:
1) Use arrow keys to highlight the line for Linux
2) Hit e
3) Select the kernel line and hit e
4) move the cursor to the end of the line and add 1
5) Hit ESC
6) Hit b to boot

This way will only work if you did not password protect your boot loader. Rarely a desktop user will do this because it adds complexity to the setup.


This way is not actually rescue mode because it just another runlevel which you can be change to run anything you want automatically at boot up. Usually runlevel 1 does not run anything except a login process to automatically login root. The rescue mode is run from the installation disc.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Mr.Smith Mandriva 2 11-27-2006 11:20 PM
root password lost odexut7 Fedora 2 01-18-2006 02:18 PM
Lost root password amirdhagopal SUSE / openSUSE 13 02-10-2005 12:09 AM
lost root password brandonAd Linux - Security 7 08-03-2003 03:23 AM
lost root password dvong3 Linux - Newbie 2 06-13-2003 09:34 AM

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

All times are GMT -5. The time now is 06:08 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