LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-27-2004, 03:14 AM   #1
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Rep: Reputation: 31
Unhappy FORGOT root passwd


I was searching for answers,but couldn't find it.

My problem is I forgot root passwd.

So all I know and find out here is:

I have to use MDK cd1,"F1" then type "rescue",then "go to console".After that I type "vi /etc/inittab".Changing to id:1: (used id:3) .Checked runnning vi again-changed succecsfuly.
So know it is changed to runlevel 1. I do ctr+alt+del and Lilo shows up.But then boots Mandrake 9.2 normaly,as before.Login as user and looking to /etc/inittab. Problem is that it is in runlevel 3 again.

Does any one please know where I am wrong?

I'll apprecaite any help.
 
Old 03-27-2004, 03:20 AM   #2
sara
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
i copied this from a site. dunno if it'll work.

> 1. Boot the Mandrake Installation CD.
> 2. Press F1 key at the installation splash screen
> 3. At the "boot:" prompt type "rescue". This will boot the "rescue"
> mini-system.
> 4. When the rescue menu comes up, choose "mount your partitions under
> /mnt". Let this execute and you will come back to the rescue menu.
> 5. Choose "Go to console" from the rescue menu.
>
> # cd /mnt/etc
> # vi passwd
>
> Edit the "passwd" and remove the "x" from the root entry line:
> Change:
>
> root:x:root:0:0:/root:/bin/bash
>
> To:
>
> root::root:0:0:/root:/bin/bash
>
> (In vi, the "x" keystroke deletes a character.) Then use ":wq" to
> save the passwd file.
>
> # reboot
>
> 6. Remove the CD as you reboot.
>
> Now you don't have a password for root......... Be sure the set a
> password when you are able to reboot.
 
Old 03-27-2004, 03:23 AM   #3
Axion
Member
 
Registered: Jan 2003
Location: Albany, NY
Distribution: Slackware 9.1, Gentoo 2004.1
Posts: 153

Rep: Reputation: 30
Sounds to me like the file you are editing, /etc/inittab, is relative to the tmpfs filesystem that is loaded into ram from your boot cd. the reason it is not saving is because its not writing to the hard disk, but to the RAM, which is flushed on reboot. try this once booted in a console again:

mkdir /tempfix
mount /dev/hda2 /tempfix
cd /tempfix
vi etc/inittab

edit, save, reboot

please note that you must change /dev/hda2 to point to the actual partition with your root file system.
 
Old 03-27-2004, 08:11 AM   #4
tk31337
Member
 
Registered: Oct 2003
Location: Tucson, AZ
Distribution: Linux Mint
Posts: 194

Rep: Reputation: 32
Wow, the solutions thus far seem a lot more complicated than how I'd handle it. You should be able to simply pass an option to your boot loader to boot into single-user mode. If you're using SuSE then this wouldn't be possible, since SuSE asks for your root password to enter single-user mode (more hassle than neccessary imho). If you're using LILO (should be default in Mandrake), then you simply press ESC to get to the text-based screen (versus the graphical selecter) and type "linux 1". For GRUB you press "e" to edit the boot options and append the middle line with "single" (or a number might work as well).

Once you're booted into single-user mode you can then run "passwd" to change your root password :-).
 
Old 03-30-2004, 12:08 AM   #5
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
Thumbs up thanx tk31337

Quote:
Originally posted by tk31337
Wow, the solutions thus far seem a lot more complicated than how I'd handle it. You should be able to simply pass an option to your boot loader to boot into single-user mode. If you're using SuSE then this wouldn't be possible, since SuSE asks for your root password to enter single-user mode (more hassle than neccessary imho). If you're using LILO (should be default in Mandrake), then you simply press ESC to get to the text-based screen (versus the graphical selecter) and type "linux 1". For GRUB you press "e" to edit the boot options and append the middle line with "single" (or a number might work as well).

Once you're booted into single-user mode you can then run "passwd" to change your root password :-).

I tried your recommendation and it works awsome!Using Lilo. thanks a lot.It works perfect.Great!!!!!

I appreciate your help,

WannaLearnLinux
 
Old 03-30-2004, 01:36 AM   #6
WannaLearnLinux
Member
 
Registered: May 2003
Location: California
Distribution: Slax
Posts: 262

Original Poster
Rep: Reputation: 31
yea Axion

Quote:
Originally posted by Axion
Sounds to me like the file you are editing, /etc/inittab, is relative to the tmpfs filesystem that is loaded into ram from your boot cd. the reason it is not saving is because its not writing to the hard disk, but to the RAM, which is flushed on reboot. try this once booted in a console again:

mkdir /tempfix
mount /dev/hda2 /tempfix
cd /tempfix
vi etc/inittab

edit, save, reboot

please note that you must change /dev/hda2 to point to the actual partition with your root file system.

Thanx for replying.But I tried what guy after you replied and it works.Yours probalby works too.

Thanx a lot.

I Appreciate your helping
 
  


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
Forgot my root passwd k1ll3r_x SUSE / openSUSE 23 04-06-2005 01:44 PM
forgot root passwd urgent nimaelec1 Red Hat 4 02-17-2005 12:37 PM
forgot root passwd sanu Linux - Newbie 2 09-21-2004 03:07 AM
forgot root passwd sanu Linux - Newbie 1 09-20-2004 05:45 AM
I have forgot my linux root passwd shankha Linux - Security 2 09-13-2003 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:45 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration