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, |
|
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. |
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) |
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 |
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. |
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 |
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 |
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 |
Yes aman, you can start GUI from any user account.
After logging into the user account just type startx |
... If it's been configured correctly by the root user ...
|
wat if there are no rights for me to start the GUI???? liamoboyle seems to understand the problem i m facing.
regards aman |
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
|
hi aman
its good to see a fellow on lq rhlinorg |
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. |