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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
03-29-2004, 09:44 AM
|
#1
|
Member
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71
Rep:
|
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,
|
|
|
03-29-2004, 09:48 AM
|
#2
|
Moderator
Registered: Aug 2002
Posts: 26,737
|
|
|
|
03-29-2004, 09:56 AM
|
#3
|
Senior Member
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305
Rep:
|
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.
|
|
|
03-29-2004, 10:07 AM
|
#4
|
Senior Member
Registered: Oct 2003
Location: hopefully not here
Distribution: Gentoo
Posts: 2,038
Rep:
|
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)
|
|
|
03-29-2004, 10:33 AM
|
#5
|
Member
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71
Original Poster
Rep:
|
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
|
|
|
03-29-2004, 08:50 PM
|
#6
|
Senior Member
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305
Rep:
|
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.
|
|
|
03-29-2004, 11:26 PM
|
#7
|
Member
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71
Original Poster
Rep:
|
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
|
|
|
03-29-2004, 11:33 PM
|
#8
|
Member
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127
Rep:
|
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 
|
|
|
03-30-2004, 12:46 AM
|
#9
|
Member
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71
Original Poster
Rep:
|
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
|
|
|
03-30-2004, 01:37 AM
|
#10
|
Senior Member
Registered: Aug 2003
Location: New Delhi, India
Distribution: Fedora 7
Posts: 1,305
Rep:
|
Yes aman, you can start GUI from any user account.
After logging into the user account just type
startx
|
|
|
03-30-2004, 02:33 PM
|
#11
|
Member
Registered: Mar 2004
Location: Wellington, New Zealand
Distribution: Debian
Posts: 127
Rep:
|
... If it's been configured correctly by the root user ...
|
|
|
03-30-2004, 11:00 PM
|
#12
|
Member
Registered: Mar 2004
Location: New York, USA
Distribution: Debian, Ubuntu
Posts: 71
Original Poster
Rep:
|
wat if there are no rights for me to start the GUI???? liamoboyle seems to understand the problem i m facing.
regards
aman
|
|
|
03-30-2004, 11:48 PM
|
#13
|
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,381
Rep:
|
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
|
|
|
03-31-2004, 05:18 AM
|
#14
|
Member
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32
Rep:
|
hi aman
its good to see a fellow on lq
rhlinorg
|
|
|
03-31-2004, 05:19 AM
|
#15
|
Member
Registered: Nov 2003
Location: delhi
Distribution: redhat 8.0 ,fedora
Posts: 32
Rep:
|
hey if i have lilo
do i follow the same procedure as for
grub
rhlinorg
LQ freak
|
|
|
All times are GMT -5. The time now is 01:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|