LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   forgotten my root password, help (https://www.linuxquestions.org/questions/linux-newbie-8/forgotten-my-root-password-help-163737/)

amanjsingh 03-29-2004 09:44 AM

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,

michaelk 03-29-2004 09:48 AM

Have you googled lately?

http://www.linuxquestions.org/questi...+root+password

LinuxLala 03-29-2004 09:56 AM

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.

SciYro 03-29-2004 10:07 AM

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)

amanjsingh 03-29-2004 10:33 AM

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

LinuxLala 03-29-2004 08:50 PM

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.

amanjsingh 03-29-2004 11:26 PM

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

liamoboyle 03-29-2004 11:33 PM

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 :D

amanjsingh 03-30-2004 12:46 AM

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

LinuxLala 03-30-2004 01:37 AM

Yes aman, you can start GUI from any user account.

After logging into the user account just type
startx

liamoboyle 03-30-2004 02:33 PM

... If it's been configured correctly by the root user ...

amanjsingh 03-30-2004 11:00 PM

wat if there are no rights for me to start the GUI???? liamoboyle seems to understand the problem i m facing.

regards
aman

bosewicht 03-30-2004 11:48 PM

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

linorg 03-31-2004 05:18 AM

hi aman
its good to see a fellow on lq
rhlinorg

linorg 03-31-2004 05:19 AM

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 10:12 PM.