Linux - NewbieThis 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.
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.
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.
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.
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.
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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.