LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-14-2008, 12:06 AM   #1
processguide
LQ Newbie
 
Registered: Feb 2008
Posts: 8

Rep: Reputation: 0
Smile forgot root password


hi,

I have linux fedora core 4 server system, i lost my root password. I try to enter when booting grub and pressing 'e'key. But there is only 'p' option is there. Anyone give me information to reset the root password and to login.

regards,
KMB
 
Old 03-14-2008, 12:39 AM   #2
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
can you login using a different linux system or do you have a bootable install cd and are able to boot the cd? you can chroot to your password-forgotten system by 'chroot /path/to/systemroot' and do "echo "root:newpassword" | chpasswd"

Last edited by konsolebox; 03-14-2008 at 12:41 AM.
 
Old 03-14-2008, 07:56 AM   #3
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
oooh nice answer <makes a note> but isn't OP talking about the GRUB password?
http://www.gnu.org/software/grub/man.../Security.html

In which case, remove the "password" bit fram /etc/boot/grub.conf (menu.lst)
http://www.linuxquestions.org/linux/..._grub_password
 
Old 03-14-2008, 09:24 AM   #4
kafnir
Member
 
Registered: Oct 2002
Location: USA
Distribution: Fedora and Ubuntu
Posts: 137

Rep: Reputation: 15
Red face step to reset fedora root password

1 -reboot your pc.
2 - when you see the fedora blue screen display, press the tab key.
3 - press e
4 - highlight the second line that saying.
kernel /vmlinuz-2.6.23.x.x.fc8 ro root=LABEL=/ rhgb quiet
5 - enter 1 after quiet
6 - press enter
7 - press b to boot to single mode
8 - the login shell display
sh-3.2#
9 - type passwd and press enter
type your new passwd and confirm the new passwd.
10 - type reboot when you done.

enjoy the freedom of choice and in..
 
Old 03-14-2008, 10:51 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
processguide: please let us know how you got on.
Quote:
Originally Posted by kafnir
1 -reboot your pc.
2 - when you see the fedora blue screen display, press the tab key.
3 - press e
4 - highlight the second line that saying.
Quote:
Originally Posted by OP
I try to enter when booting grub and pressing 'e' key. But there is only 'p' option is there.
OP seems to be telling us that the "press e" option is not there.
However - this does provide a different way to break into the PC.

The lesson to take away from all this is that it is very difficult to protect against an attacker who has physical access to the machine.
 
Old 03-14-2008, 11:43 PM   #6
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
well if that's the case shouldn't he just boot from a boot cd and re-place grub from there?
 
Old 03-14-2008, 11:57 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
that replaces stage in the mbr doesn't it? You still need to edit the menu list.
 
Old 03-15-2008, 12:59 AM   #8
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
yes reconfigure or simply replace the mbr.. and also yes perhaps edit the menu.lst to disable the security.
after running grub in the boot cd, the command seems to be just something like this:
Code:
root (hd0,X)
find /boot/grub/stage1_5
setup (hd0)
where X is the partition number of your boot partition.
That's what I do most of the time when some OS replaces my boot records.
Here btw I don't know the purpose of 'find /boot/grub/stage1_5'.
It seems to be of no use.. perhaps just to put the file locations in the buffer for use with the setup command.. although obviously it's to show the user where the files are.. showing what to add as a parameter to another command but setup doesn't seem to need any parameter either.

hmmmmm.. maybe the sequence of the command is:
Code:
root (hd0)
find /boot/grub/stage1_5
# now you know where the boot files are
root (hd0,X)
setup (hd0)
perhaps we'll need a grub expert for this

btw i use these command sequence instead of grub-install because sometimes grub-install doesn't work the way it should.

Last edited by konsolebox; 03-15-2008 at 01:01 AM.
 
Old 03-16-2008, 02:27 AM   #9
niceguy_81333
Member
 
Registered: Mar 2008
Location: India
Distribution: RHEL5
Posts: 34

Rep: Reputation: 15
How about trying this
1. Position the cursor on Kernel and type e
2. Boot to a shell : add
init=/bin/sh
(the file system is mounted read-only so you can copy files out. You need to remount the file system with read/write permission to be able to change files.

Note : my kind apologies to all boarders, if iam wrongly interpreting the problem.
rgds
bil

Linux registered user #467324
_________________________________________________________________
ALL HUMAN ACTIONS ARE EQUIVALENT ..........
AND ALL ARE ON PRINCIPLE DOOMED 2 FAILURE
_________________________________________________________________
 
Old 03-17-2008, 02:00 AM   #10
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,430

Rep: Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787
I'd certainly say that if you can login as yourself (or anyone) and 'su -' or sudo up, that's got to be simpler than messing directly with GRUB etc at boot time.
 
Old 03-17-2008, 02:08 AM   #11
konsolebox
Senior Member
 
Registered: Oct 2005
Distribution: Gentoo, Slackware, LFS
Posts: 2,248
Blog Entries: 8

Rep: Reputation: 235Reputation: 235Reputation: 235
another one.. i think this OP's a bot too. i made a long speech and now i feel like i'm a fool. why do they do this anyway?
 
  


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
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
forgot root password wetbird SUSE / openSUSE 2 12-16-2006 04:52 PM
Forgot My Root Password bluesky2_1986 SUSE / openSUSE 7 07-21-2006 11:47 AM
Forgot root password Action Linux - Newbie 1 07-07-2005 07:09 PM
Forgot Root Password Darthcoder Linux - Newbie 5 11-08-2003 03:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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