LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-29-2004, 09:44 AM   #1
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Rep: Reputation: 15
Exclamation forgotten my root password, help


hi guys,

can u help me out, m sure u can. i have forgotten my root password. i use redhat 9 distribution. my bootloader is GRUB. i hav another account as amanjsingh, but i have forgotten the password for root. how can i retrieve it? or else can i change it? plz help. i m new to linux, so kindly be a little specific. moreover i donno how to get into commandline from GUI. plz help me out.

regards,
 
Old 03-29-2004, 09:48 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 26,737

Rep: Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316Reputation: 6316
Have you googled lately?

http://www.linuxquestions.org/questi...+root+password
 
Old 03-29-2004, 09:56 AM   #3
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Hey it's easy, BUT, first u have to prove that you indeed have permission to the root.

Ok just kidding. Here it is.

At the GRUB screen, select the kernel to boot and then hit 'e'.
Now cursor down to the line that starts with 'kernel' and move all the way to the end of the line. Put a space after any existing kernel arguments and type the number '1' (without the quotes). Hit enter here to accept the change and you're back at the grub boot screen.

Then hit 'b' to boot to this line. The system will boot into runlevel 1 (single user mode) and you will be dropped to a root prompt without being prompted for the password. From here you can type 'passwd' (without quotes). You will be prompted to supply the new password. When you're done, type 'exit' (without quotes) and the system will boot to the default runlevel.

Last edited by LinuxLala; 03-29-2004 at 09:58 AM.
 
Old 03-29-2004, 10:07 AM   #4
SciYro
Senior Member
 
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038

Rep: Reputation: 51
i do think its overly easy to get root access to linux machines.... (esp with grub, as it has menus and stuff like that), then with those "single user modes", jeesh, its almost asking for trouble.....

anyway, if you were smart enough to block that "single user mode" stuff, just go download a live cd based distro of linux (lnx-bbc is good, as its only 50 MB, but it worked kinda crappy with my hardware, but it still work good, just crashed more then a regular distro, well thats you i get for faster download times )..

anyway, from booting with a CD based disto , just chroot onto the hard disk, (by default this gets you root access as far as bash is concerned ), then type "passwd" without the quotes and your set (just like the post above)
 
Old 03-29-2004, 10:33 AM   #5
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 15
hey guys,
that thing by linuxlala jusssssss worked fine, thanx a lot guys for your help pals. i m grateful and happy. . one more thing...

if u cud tell me the procedure thru commandline, suppose if i dont hav access to the GUI, and jus the commandline, then wat do i do to get into the root if i dont know the password???

thanx anyways for ur kind support. this is a nice place for linux learners, great place, great people.

regards
aman
 
Old 03-29-2004, 08:50 PM   #6
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Hi Aman.

If you don't have access/lost password to root, then, you need to change the root password using the procedure I explained above. There is no other way you can get into root.

Now you can easily enter root supplying the new password.

Cheers.
 
Old 03-29-2004, 11:26 PM   #7
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 15
dear linuxlala,

i did as per told by u and i hav successfully changed my password. but i am talkin of some other machine, on which i dont hav GUI access, and unfortunately i dont know the root password.

i told u that commands like init 5 , even they dont work...

can u help me as i wanna get into GUI of that machine.

thanx for ur great help buddy. even i m in new delhi. i study in IP university doin my engineering. wat abt u?

regards

aman
 
Old 03-29-2004, 11:33 PM   #8
liamoboyle
Member
 
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127

Rep: Reputation: 15
The other machines may not have a GUI installed; many servers don't.

If it doesn't start with a GUI, then it will start with a login prompt. Use the username root and the appropriate password to log in.

Common ways to start include
/etc/init.d/gdm start
/etc/init.d/xdm start
/etc/init.d/kdm start
startx

You can try a few
 
Old 03-30-2004, 12:46 AM   #9
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 15
sir wat if i dont have a root password, can i start the GUI from any other account? thanx a lot for ur help sir.

m glad to be here

regards
aman
 
Old 03-30-2004, 01:37 AM   #10
LinuxLala
Senior Member
 
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305

Rep: Reputation: 45
Yes aman, you can start GUI from any user account.

After logging into the user account just type
startx
 
Old 03-30-2004, 02:33 PM   #11
liamoboyle
Member
 
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127

Rep: Reputation: 15
... If it's been configured correctly by the root user ...
 
Old 03-30-2004, 11:00 PM   #12
amanjsingh
Member
 
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71

Original Poster
Rep: Reputation: 15
wat if there are no rights for me to start the GUI???? liamoboyle seems to understand the problem i m facing.

regards
aman
 
Old 03-30-2004, 11:48 PM   #13
bosewicht
Senior Member
 
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381

Rep: Reputation: 47
i think you were told the answer a couple of times to ur question. It sounds like u are just trying to hack into a machine anyways
 
Old 03-31-2004, 05:18 AM   #14
linorg
Member
 
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32

Rep: Reputation: 15
hi aman
its good to see a fellow on lq
rhlinorg
 
Old 03-31-2004, 05:19 AM   #15
linorg
Member
 
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32

Rep: Reputation: 15
hey if i have lilo
do i follow the same procedure as for
grub
rhlinorg
LQ freak
 
  


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
if the root password is forgotten..... AnimaSola Linux - Software 1 05-31-2005 10:12 PM
How to reset forgotten root password comprookie2000 Linux - Newbie 4 10-28-2004 12:33 PM
Forgotten my root password Blondie Linux - Newbie 2 12-08-2003 11:50 AM
Root Password FORGOTTEN kajensen Linux - Newbie 4 08-11-2003 02:06 AM
Mandrake 9 : Forgotten Root Password acadcworks Linux - General 8 12-18-2002 03:41 PM

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

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